Class QrCodePositionPatternDetector<T extends ImageGray<T>>

java.lang.Object
boofcv.alg.fiducial.qrcode.QrCodePositionPatternDetector<T>
All Implemented Interfaces:
VerbosePrint

public class QrCodePositionPatternDetector<T extends ImageGray<T>>
extends Object
implements VerbosePrint
Detects position patterns for a QR code inside an image. This is done by detecting squares and seeing if they have the expected shape.

If a lens distortion model is provided the returned pixel coordinates will be in an undistorted image

  • Field Details

    • profilingMS

      protected MovingAverage profilingMS
      runtime profiling
  • Constructor Details

    • QrCodePositionPatternDetector

      public QrCodePositionPatternDetector​(DetectPolygonBinaryGrayRefine<T> squareDetector)
      Configures the detector
      Parameters:
      squareDetector - Square detector
  • Method Details

    • resetRuntimeProfiling

      public void resetRuntimeProfiling()
    • 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 - Thresholed version of gray image.
    • 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.
    • setVerbose

      public void setVerbose​(@Nullable @Nullable PrintStream out, @Nullable @Nullable Set<String> configuration)
      Specified by:
      setVerbose in interface VerbosePrint