public class DetectFiducialSquareImage<T extends boofcv.struct.image.ImageGray<T>> extends BaseDetectFiducialSquare<T>
Fiducial which uses images to describe arbitrary binary patterns. When useing this fiducial it's up to the user to select good images which will provide unique orientation and are easily distinguished against other patterns and noise insensitive.
The above image visually shows the fiducials internal coordinate system. The center of the fiducial is the origin of the coordinate system, e.g. all sides are width/2 distance away from the origin. +x is to the right, +y is up , and +z out of the paper towards the viewer.
A good pattern will have thick lines or thick shapes. When detecting the image it's not uncommon for the distortion removal to be off by one or two pixels. So think lines are be completely out of synch. The image should also be chosen so that there is to rotational ambiguity. A perfect circle in the center is an example of a bad fiducial in which orientation can't be uniquely determined.
| Modifier and Type | Class and Description |
|---|---|
static class |
DetectFiducialSquareImage.FiducialDef
description of an image in 4 different orientations
|
BaseDetectFiducialSquare.ResultborderWidthFraction, verbose| Constructor and Description |
|---|
DetectFiducialSquareImage(boofcv.abst.filter.binary.InputToBinary<T> inputToBinary,
boofcv.alg.shapes.polygon.DetectPolygonBinaryGrayRefine<T> quadDetector,
double borderWidthFraction,
double minimumBlackBorderFraction,
double matchThreshold,
java.lang.Class<T> inputType)
Configures the fiducial detector
|
| Modifier and Type | Method and Description |
|---|---|
int |
addPattern(boofcv.struct.image.GrayU8 inputBinary,
double lengthSide)
Adds a new image to the detector.
|
protected static void |
binaryToDef(boofcv.struct.image.GrayU8 binary,
short[] desc)
Converts a binary image into the compressed bit format
|
java.util.List<DetectFiducialSquareImage.FiducialDef> |
getTargets() |
protected int |
hamming(short[] a,
short[] b)
Computes the hamming score between two descriptions.
|
protected boolean |
processSquare(boofcv.struct.image.GrayF32 gray,
BaseDetectFiducialSquare.Result result,
double edgeInside,
double edgeOutside)
Processes the detected square and matches it to a known fiducial.
|
computeFractionBoundary, configure, getBinary, getBorderWidthFraction, getFound, getInputType, getSquareDetector, getThresholdSideRatio, process, setThresholdSideRatio, setVerbosepublic DetectFiducialSquareImage(boofcv.abst.filter.binary.InputToBinary<T> inputToBinary, boofcv.alg.shapes.polygon.DetectPolygonBinaryGrayRefine<T> quadDetector, double borderWidthFraction, double minimumBlackBorderFraction, double matchThreshold, java.lang.Class<T> inputType)
matchThreshold - Considered a match if the hamming distance is less than this fraction of the maximumpublic int addPattern(boofcv.struct.image.GrayU8 inputBinary,
double lengthSide)
inputBinary - Binary input image pattern. 0 = black, 1 = white.lengthSide - How long one of the sides of the target is in world units.protected static void binaryToDef(boofcv.struct.image.GrayU8 binary,
short[] desc)
protected boolean processSquare(boofcv.struct.image.GrayF32 gray,
BaseDetectFiducialSquare.Result result,
double edgeInside,
double edgeOutside)
BaseDetectFiducialSquareprocessSquare in class BaseDetectFiducialSquare<T extends boofcv.struct.image.ImageGray<T>>gray - Image of the undistorted squareresult - Which target and its orientation was foundedgeInside - Average pixel value along edge insideedgeOutside - Average pixel value along edge outsideprotected int hamming(short[] a,
short[] b)
public java.util.List<DetectFiducialSquareImage.FiducialDef> getTargets()