Package boofcv.alg.fiducial.qrcode
Class SquareLocatorPatternDetectorBase<T extends ImageGray<T>>
java.lang.Object
boofcv.alg.fiducial.qrcode.SquareLocatorPatternDetectorBase<T>
- All Implemented Interfaces:
VerbosePrint
- Direct Known Subclasses:
AztecFinderPatternDetector
,QrCodePositionPatternDetector
public abstract class SquareLocatorPatternDetectorBase<T extends ImageGray<T>>
extends Object
implements VerbosePrint
Several fiducials use square objects as locator patterns for the markers. This contains common code.
-
Field Summary
Modifier and TypeFieldDescriptionprotected InterpolatePixelS<T>
used to subsample the input imageprotected double
Used to prune very large contours.protected MovingAverage
runtime profilingprotected DetectPolygonBinaryGrayRefine<T>
Used to detect black squaresprotected @Nullable PrintStream
-
Constructor Summary
ModifierConstructorDescriptionprotected
SquareLocatorPatternDetectorBase
(DetectPolygonBinaryGrayRefine<T> squareDetector) Configures the detector -
Method Summary
Modifier and TypeMethodDescriptionprotected void
configureContourDetector
(T gray) Configures the contour detector based on the image size.protected abstract void
Called after squares have been detected and you are using detected squares to identify locator patternsvoid
Detects position patterns inside the image and forms a graph.void
setLensDistortion
(int width, int height, @Nullable LensDistortionNarrowFOV model) Specifies transforms which can be used to change coordinates from distorted to undistorted and the opposite coordinates.void
setVerbose
(@Nullable PrintStream out, @Nullable Set<String> configuration)
-
Field Details
-
interpolate
used to subsample the input image -
maxContourFraction
protected double maxContourFractionUsed to prune very large contours. This is tuned for QR codes which have two position patterns side by side -
squareDetector
Used to detect black squares -
profilingMS
runtime profiling -
verbose
-
-
Constructor Details
-
SquareLocatorPatternDetectorBase
Configures the detector- Parameters:
squareDetector
- Square detector
-
-
Method Details
-
process
Detects position patterns inside the image and forms a graph.- Parameters:
gray
- Gray scale input imagebinary
- Binary version of gray image.
-
findLocatorPatternsFromSquares
protected abstract void findLocatorPatternsFromSquares()Called after squares have been detected and you are using detected squares to identify locator patterns -
setLensDistortion
public void setLensDistortion(int width, int height, @Nullable @Nullable LensDistortionNarrowFOV model) Specifies transforms which can be used to change coordinates from distorted to undistorted and the opposite coordinates. The undistorted image is never explicitly created.
- Parameters:
width
- Input image width. Used in sanity check only.height
- Input image height. Used in sanity check only.model
- distortion model. Null to remove a distortion model.
-
configureContourDetector
Configures the contour detector based on the image size. Setting a maximum contour and turning off recording of inner contours and improve speed and reduce the memory footprint significantly. -
setVerbose
public void setVerbose(@Nullable @Nullable PrintStream out, @Nullable @Nullable Set<String> configuration) - Specified by:
setVerbose
in interfaceVerbosePrint
-