public Coordinate Execute(TOcrResultStructures.TOcrResultsItem start, TOcrResultStructures.TOcrResultsItem end, int imgWidth, int imgHeight) { double x = start.XPos; double y = start.YPos; double height = Math.Max(start.YDim, end.XDim); double width = end.XPos + end.XDim - start.XPos; return(_createRelativeCoordinate.Execute(x, y, height, width, imgHeight, imgWidth)); }
private static bool IsNewSentence(TOcrResultStructures.TOcrResultsItem last, TOcrResultStructures.TOcrResultsItem item) { return((last.XPos + last.XDim + (Math.Max(item.YDim, last.YDim) * 2)) < item.XPos); }
private Coordinate CreateCoordinate(TOcrResultStructures.TOcrResultsItem start, TOcrResultStructures.TOcrResultsItem end, int width, int heigt) { return(_transymCreateRelativeCoordinate.Execute(start, end, width, heigt)); }