public static < T extends ImageGray < T > > QrCodePreciseDetector < T > qrcode ( ConfigQrCode config , Class < T > imageType ) { if ( config == null ) config = new ConfigQrCode ( ) ; config . checkValidity ( ) ; InputToBinary < T > inputToBinary = FactoryThresholdBinary . threshold ( config . threshold , imageType ) ; DetectPolygonBinaryGrayRefine < T > squareDetector = FactoryShapeDetector . polygon ( config . polygon , imageType ) ; QrCodePositionPatternDetector < T > detectPositionPatterns = new QrCodePositionPatternDetector <> ( squareDetector , config . versionMaximum ) ; return new QrCodePreciseDetector <> ( inputToBinary , detectPositionPatterns , config . forceEncoding , false , imageType ) ; }
Returns a QR Code detector