public class ECoCheckGenerator extends Object
Renders an Error COrrecting Checkerboard (ECoCheck) marker to an image. The marker is composed of a checkerboard pattern combined with binary encoding in white spaces between the black checkerboard pattern. Using the encoded binary pattern, its possible to uniquely determine the marker, and which calibration points are being observed even when parts of the marker go outside the image bounds or are obstructed. TODO Add image of an example. A standard checkerboard pattern is drawn first. The outer squares will be half width as to maximize the usable space. Only inner corners (x-corners) are used as calibration points and a full outer square does not aide significantly in detection. If they were too small then the ability to detect x-corners would degrade. The square grid is defined using the black and white squares with the origin being the top-left square, which is always black, +x is to the right and +y is down. A quite-zone of white is required around the marker to reduce confusion with the background. Omitting the quite-zone will degrade performance in challenging environments. Inner white squares are encoded with a binary pattern that specifies which square its inside of and which marker its a member of. Some bits are allocated towards a checksum and others can perform error correction. A complete description of the encoding can be found inside of
ECoCheckCodecand how the image processing is done in
ECoCheckDetector. TODO define the order in which bits are drawn and where the origin is. Also define the corner-grid coordinate system. Definitions:
- data region
- Square region containing the encoded message inside a white inner square
- data region coordinates
- 2D coordinate system with the origin in the data region's top-left corner. Values vary from 0 to 1. Where 0 is at the origin and 1 is either the x or y axis border.
- inner square
- Square (white or black) inside chessboard which does not touch the border
- Region in which a single bit of data is encoded. size is data-region's length / grid size
- grid size
- The length of a grid. size=5 then there are 25 cells in the grid.
- White space surrounding an image feature which reduces confusion with the background or other features.
squareWidthpublic double squareWidthHow wide a checkerboard square is
renderprotected FiducialRenderEngine render
renderpublic void render
saveCornerLocationspublic void saveCornerLocations