public class BinaryEllipseDetector<T extends boofcv.struct.image.ImageGray>
extends java.lang.Object
| Constructor and Description |
|---|
BinaryEllipseDetector(BinaryEllipseDetectorPixel ellipseDetector,
SnapToEllipseEdge<T> ellipseRefiner,
EdgeIntensityEllipse<T> intensityCheck,
java.lang.Class<T> inputType)
Configures the detector
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<boofcv.alg.filter.binary.Contour> |
getAllContours() |
BinaryEllipseDetectorPixel |
getEllipseDetector() |
org.ddogleg.struct.FastQueue<georegression.struct.shapes.EllipseRotated_F64> |
getFoundEllipses()
Returns all the found ellipses in the input image.
|
java.lang.Class<T> |
getInputType() |
boolean |
isAutoRefine() |
boolean |
isVerbose() |
void |
process(T gray,
boofcv.struct.image.GrayU8 binary)
Detects ellipses inside the binary image and refines the edges for all detections inside the gray image
|
boolean |
refine(georegression.struct.shapes.EllipseRotated_F64 ellipse)
If auto refine is turned off an ellipse can be refined after the fact using this function, provided
that the refinement algorithm was passed in to the constructor
|
void |
setAutoRefine(boolean autoRefine) |
void |
setLensDistortion(boofcv.struct.distort.PixelTransform2_F32 distToUndist,
boofcv.struct.distort.PixelTransform2_F32 undistToDist)
Specifies transforms which can be used to change coordinates from distorted to undistorted.
|
void |
setVerbose(boolean verbose) |
public BinaryEllipseDetector(BinaryEllipseDetectorPixel ellipseDetector, SnapToEllipseEdge<T> ellipseRefiner, EdgeIntensityEllipse<T> intensityCheck, java.lang.Class<T> inputType)
ellipseDetector - Detector which uses pixel precise edgesellipseRefiner - Sub pixel edge refinement. If null the refinement step is skippedintensityCheck - Computes the intensity of the edge to remove false positivesinputType - Input image typepublic void setLensDistortion(boofcv.struct.distort.PixelTransform2_F32 distToUndist,
boofcv.struct.distort.PixelTransform2_F32 undistToDist)
Specifies transforms which can be used to change coordinates from distorted to undistorted. The undistorted image is never explicitly created.
WARNING: The undistorted image must have the same bounds as the distorted input image. This is because several of the bounds checks use the image shape. This are simplified greatly by this assumption.
distToUndist - Transform from distorted to undistorted image.undistToDist - Transform from undistorted to distorted image.public void process(T gray, boofcv.struct.image.GrayU8 binary)
gray - Grayscale imagebinary - Binary image of grayscale. 1 = ellipse and 0 = ignored backgroundpublic boolean refine(georegression.struct.shapes.EllipseRotated_F64 ellipse)
ellipse - The ellipse to be refinedpublic BinaryEllipseDetectorPixel getEllipseDetector()
public boolean isVerbose()
public void setVerbose(boolean verbose)
public boolean isAutoRefine()
public void setAutoRefine(boolean autoRefine)
public java.lang.Class<T> getInputType()
public java.util.List<boofcv.alg.filter.binary.Contour> getAllContours()
public org.ddogleg.struct.FastQueue<georegression.struct.shapes.EllipseRotated_F64> getFoundEllipses()
Returns all the found ellipses in the input image.
WARNING: Returned data is recycled on the next call to process