public class DetectPolygonBinaryGrayRefine<T extends boofcv.struct.image.ImageGray<T>>
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
DetectPolygonBinaryGrayRefine.AdjustBeforeRefineEdge |
| Constructor and Description |
|---|
DetectPolygonBinaryGrayRefine(DetectPolygonFromContour<T> detector,
RefinePolygonToContour refineContour,
RefinePolygonToGray<T> refineGray,
double minimumRefineEdgeIntensity,
boolean adjustForThresholdBias)
Configures the polygon detector
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearLensDistortion()
Discard previously set lens distortion models
|
java.util.List<boofcv.alg.filter.binary.ContourPacked> |
getAllContours() |
DetectPolygonFromContour<T> |
getDetector() |
java.lang.Class<T> |
getInputType() |
int |
getMaximumSides() |
double |
getMilliAdjustBias() |
int |
getMinimumSides() |
java.util.List<DetectPolygonFromContour.Info> |
getPolygonInfo() |
java.util.List<georegression.struct.shapes.Polygon2D_F64> |
getPolygons(java.util.List<georegression.struct.shapes.Polygon2D_F64> storage,
java.util.List<DetectPolygonFromContour.Info> storageInfo)
Returns a list of all polygons with an edge threshold above the minimum
|
boolean |
isOutputClockwise() |
void |
process(T gray,
boofcv.struct.image.GrayU8 binary)
Detects polygons inside the grayscale image and its thresholded version
|
boolean |
refine(DetectPolygonFromContour.Info info)
Refines the fit to the specified polygon.
|
void |
refineAll()
Refines all the detected polygons and places them into the provided list.
|
void |
resetRuntimeProfiling() |
void |
setFunctionAdjust(DetectPolygonBinaryGrayRefine.AdjustBeforeRefineEdge functionAdjust) |
void |
setHelper(PolygonHelper helper)
Specify a helper used to inject specialized code into the polygon detector
|
void |
setLensDistortion(int width,
int height,
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 and the opposite
coordinates.
|
void |
setVerbose(boolean verbose)
Turn on and off verbose output to standard out
|
public DetectPolygonBinaryGrayRefine(DetectPolygonFromContour<T> detector, RefinePolygonToContour refineContour, RefinePolygonToGray<T> refineGray, double minimumRefineEdgeIntensity, boolean adjustForThresholdBias)
detector - Fits a polygon to a contourrefineContour - Refines the polygon produce a better fit against the contourrefineGray - Refine the edges to the input gray scale imageminimumRefineEdgeIntensity - Threshold for pruning shapes. Must have this edge intensity. Try 6adjustForThresholdBias - Should it adjust contour polygons for the bias caused by thresholding?public void setHelper(PolygonHelper helper)
public void setVerbose(boolean verbose)
public void setLensDistortion(int width,
int height,
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 and the opposite coordinates. The undistorted image is never explicitly created.
width - Input image width. Used in sanity check only.height - Input image height. Used in sanity check only.distToUndist - Transform from distorted to undistorted image.undistToDist - Transform from undistorted to distorted image.public void clearLensDistortion()
public void resetRuntimeProfiling()
public void process(T gray, boofcv.struct.image.GrayU8 binary)
gray - Gray scale imagebinary - Binary version of grayscale imagepublic boolean refine(DetectPolygonFromContour.Info info)
info - The polygon and related infopublic void refineAll()
public java.util.List<georegression.struct.shapes.Polygon2D_F64> getPolygons(@Nullable
java.util.List<georegression.struct.shapes.Polygon2D_F64> storage,
@Nullable
java.util.List<DetectPolygonFromContour.Info> storageInfo)
storageInfo - Optional storage for info associated with polygons. Pruning is done so the info list
and the returned polygon list are not in synch with each otherpublic java.util.List<DetectPolygonFromContour.Info> getPolygonInfo()
public java.lang.Class<T> getInputType()
public int getMinimumSides()
public int getMaximumSides()
public boolean isOutputClockwise()
public DetectPolygonFromContour<T> getDetector()
public java.util.List<boofcv.alg.filter.binary.ContourPacked> getAllContours()
public void setFunctionAdjust(DetectPolygonBinaryGrayRefine.AdjustBeforeRefineEdge functionAdjust)
public double getMilliAdjustBias()