public class DocCoordinates extends Object
| 构造器 | 说明 |
|---|---|
DocCoordinates() |
Default constructor used to create a
DocCoordinates instance. |
DocCoordinates(CvPoint topLeft,
CvPoint topRight,
CvPoint bottomLeft,
CvPoint bottomRight) |
A constructor used to create a
DocCoordinates instance
based on the corner coordinates of the document bounding box. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
CvPoint |
getBottomLeft() |
Obtains the coordinate of the
CvPoint data type in the lower left corner of the document bounding box. |
CvPoint |
getBottomRight() |
Obtains the coordinate of the
CvPoint data type in the lower right corner of the document bounding box. |
CvPoint |
getTopLeft() |
Obtains the coordinate of the
CvPoint data type in the upper left corner of the document bounding box. |
CvPoint |
getTopRight() |
Obtains the coordinate of the
CvPoint data type in the upper right corner of the document bounding box. |
void |
scaleDocCoordinates(float scale) |
Uses a specified scale to zoom in or out the text border.
|
void |
scaleDocCoordinates(float scaleX,
float scaleY) |
Uses the specified scales to zoom in or out in the horizontal and vertical directions of the text border.
|
void |
setBottomLeft(CvPoint bottomLeft) |
Sets the coordinate of the
CvPoint data type in the lower left corner of the document bounding box. |
void |
setBottomRight(CvPoint bottomRight) |
Sets the coordinate of the
CvPoint data type in the lower right corner of the document bounding box. |
void |
setDocCoordinates(DocCoordinates docCoordinates) |
Creates a
DocCoordinates instance
by using the corner coordinates of the DocCoordinates data type. |
void |
setTopLeft(CvPoint topLeft) |
Sets the coordinate of the
CvPoint data type in the upper left corner of the document bounding box. |
void |
setTopRight(CvPoint topRight) |
Sets the coordinate of the
CvPoint data type in the upper right corner of the document bounding box. |
static ArrayList<Integer> |
toArrayList(DocCoordinates docCoordinates) |
Converts a
DocCoordinates instance
to the corner coordinates of the List<Integer> data type of a text border. |
static DocCoordinates |
toCoordinates(List<Integer> points) |
Creates a
DocCoordinates instance
by using the corner coordinate list of the List<Integer> data type. |
public DocCoordinates(CvPoint topLeft, CvPoint topRight, CvPoint bottomLeft, CvPoint bottomRight)
DocCoordinates instance
based on the corner coordinates of the document bounding box.topLeft - Indicates the coordinate of the CvPoint data type
in the upper left corner of the document bounding box.topRight - Indicates the coordinate of the CvPoint data type
in the upper right corner of the document bounding box.bottomLeft - Indicates the coordinate of the CvPoint data type
in the lower left corner of the document bounding box.bottomRight - Indicates the coordinate of the CvPoint data type
in the lower right corner of the document bounding box.public DocCoordinates()
DocCoordinates instance.public CvPoint getBottomLeft()
CvPoint data type in the lower left corner of the document bounding box.CvPoint data type
in the lower left corner of the document bounding box.public CvPoint getBottomRight()
CvPoint data type in the lower right corner of the document bounding box.CvPoint data type
in the lower right corner of the document bounding box.public CvPoint getTopLeft()
CvPoint data type in the upper left corner of the document bounding box.CvPoint data type
in the upper left corner of the document bounding box.public CvPoint getTopRight()
CvPoint data type in the upper right corner of the document bounding box.CvPoint data type
in the upper right corner of the document bounding box.public void setBottomLeft(CvPoint bottomLeft)
CvPoint data type in the lower left corner of the document bounding box.bottomLeft - Indicates the coordinate of the CvPoint data type
in the lower left corner of the document bounding box.public void setBottomRight(CvPoint bottomRight)
CvPoint data type in the lower right corner of the document bounding box.bottomRight - Indicates the coordinate of the CvPoint data type
in the lower right corner of the document bounding box.public void setTopLeft(CvPoint topLeft)
CvPoint data type in the upper left corner of the document bounding box.topLeft - Indicates the coordinate of the CvPoint data type
in the upper left corner of the document bounding box.public void setTopRight(CvPoint topRight)
CvPoint data type in the upper right corner of the document bounding box.topRight - Indicates the coordinate of the CvPoint data type
in the upper right corner of the document bounding box.public void scaleDocCoordinates(float scale)
The scale is passed by the caller, and the value range is determined by the variable type.
scale - Indicates the scale to zoom in or out.public void scaleDocCoordinates(float scaleX,
float scaleY)
scaleX - Indicates the scale to zoom in or out in the horizontal direction.scaleY - Indicates the scale to zoom in or out in the vertical direction.public void setDocCoordinates(DocCoordinates docCoordinates)
DocCoordinates instance
by using the corner coordinates of the DocCoordinates data type.docCoordinates - Indicates the corner coordinates of the document bounding box.public static DocCoordinates toCoordinates(List<Integer> points)
DocCoordinates instance
by using the corner coordinate list of the List<Integer> data type.points - Indicates the corner coordinate list of the List<Integer> data type.DocCoordinates instance.public static ArrayList<Integer> toArrayList(DocCoordinates docCoordinates)
DocCoordinates instance
to the corner coordinates of the List<Integer> data type of a text border.docCoordinates - Indicates a DocCoordinates instance.List<Integer> data type.