Class SquareGridTools
java.lang.Object
boofcv.alg.fiducial.calib.squares.SquareGridTools
A class for manipulating
SquareGrid
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
boundingPolygonCCW
(SquareGrid grid, Polygon2D_F64 bounding) Get outside corner polygon around the grid.boolean
checkFlip
(SquareGrid grid) Checks to see if it needs to be flipped.double
computeSize
(SquareGrid grid) protected int
findIntersection
(SquareNode target, SquareNode node) Finds the side which intersects the line segment from the center of target to center of nodevoid
flipColumns
(SquareGrid grid) Flips the order of columnsvoid
flipRows
(SquareGrid grid) Flips the order of rowsprotected void
orderNode
(SquareNode target, SquareNode node, boolean pointingX) Fills the ordered list with the corners in target node in canonical order.protected void
orderNodeGrid
(SquareGrid grid, int row, int col) Given the grid coordinate, order the corners for the node at that location.boolean
orderSquareCorners
(SquareGrid grid) Adjust the corners in the square's polygon so that they are aligned along the grids overall lengthvoid
putIntoCanonical
(SquareGrid grid) There can be 2 or 4 possible orientations which are equally valid solutions.void
reverse
(SquareGrid grid) void
rotateCCW
(SquareGrid grid) static int
sign
(LineGeneral2D_F64 line, Point2D_F64 p) void
transpose
(SquareGrid grid) Transposes the grid
-
Constructor Details
-
SquareGridTools
public SquareGridTools()
-
-
Method Details
-
putIntoCanonical
There can be 2 or 4 possible orientations which are equally valid solutions. For sake of consistency it will make the (0,0) coordinate be closest to the origin of the image coordinate system. -
rotateCCW
-
reverse
-
checkFlip
Checks to see if it needs to be flipped. Flipping is required if X and Y axis in 2D grid are not CCW. -
computeSize
-
transpose
Transposes the grid -
flipRows
Flips the order of rows -
flipColumns
Flips the order of columns -
boundingPolygonCCW
Get outside corner polygon around the grid. The grid is assumed to be in CCW orientation. -
orderNodeGrid
Given the grid coordinate, order the corners for the node at that location. Takes in handles situations where there are no neighbors. -
orderNode
Fills the ordered list with the corners in target node in canonical order.- Parameters:
pointingX
- true if 'node' is pointing along the x-axis from target. false for point along y-axis
-
findIntersection
Finds the side which intersects the line segment from the center of target to center of node -
orderSquareCorners
Adjust the corners in the square's polygon so that they are aligned along the grids overall length- Returns:
- true if valid grid or false if not
-
sign
-