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 Details

    • interpolate

      protected InterpolatePixelS<T extends ImageGray<T>> interpolate
      used to subsample the input image
    • maxContourFraction

      protected double maxContourFraction
      Used to prune very large contours. This is tuned for QR codes which have two position patterns side by side
    • squareDetector

      protected DetectPolygonBinaryGrayRefine<T extends ImageGray<T>> squareDetector
      Used to detect black squares
    • profilingMS

      protected MovingAverage profilingMS
      runtime profiling
    • verbose

      @Nullable protected @Nullable PrintStream verbose
  • Constructor Details

    • SquareLocatorPatternDetectorBase

      protected SquareLocatorPatternDetectorBase(DetectPolygonBinaryGrayRefine<T> squareDetector)
      Configures the detector
      Parameters:
      squareDetector - Square detector
  • Method Details

    • process

      public void process(T gray, GrayU8 binary)
      Detects position patterns inside the image and forms a graph.
      Parameters:
      gray - Gray scale input image
      binary - 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

      protected void configureContourDetector(T gray)
      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 interface VerbosePrint