Class SquareGridTools
java.lang.Object
boofcv.alg.fiducial.calib.squares.SquareGridTools
A class for manipulating
SquareGrid-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidboundingPolygonCCW(SquareGrid grid, Polygon2D_F64 bounding) Get outside corner polygon around the grid.booleancheckFlip(SquareGrid grid) Checks to see if it needs to be flipped.doublecomputeSize(SquareGrid grid) protected intfindIntersection(SquareNode target, SquareNode node) Finds the side which intersects the line segment from the center of target to center of nodevoidflipColumns(SquareGrid grid) Flips the order of columnsvoidflipRows(SquareGrid grid) Flips the order of rowsprotected voidorderNode(SquareNode target, SquareNode node, boolean pointingX) Fills the ordered list with the corners in target node in canonical order.protected voidorderNodeGrid(SquareGrid grid, int row, int col) Given the grid coordinate, order the corners for the node at that location.booleanorderSquareCorners(SquareGrid grid) Adjust the corners in the square's polygon so that they are aligned along the grids overall lengthvoidputIntoCanonical(SquareGrid grid) There can be 2 or 4 possible orientations which are equally valid solutions.voidreverse(SquareGrid grid) voidrotateCCW(SquareGrid grid) static intsign(LineGeneral2D_F64 line, Point2D_F64 p) voidtranspose(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
-