WeChatQRCodeDetector

微信二维码检测器

Author

Jenly

Follow me

Functions

Link copied to clipboard
fun detectAndDecode(bitmap: Bitmap, points: MutableList<Mat>): List<String>
fun detectAndDecode(img: Mat, points: MutableList<Mat>): List<String>

Both detects and decodes QR code. To simplify the usage, there is a only API: detectAndDecode

Link copied to clipboard
fun detectAndDecodeResult(bitmap: Bitmap, isOutputVertices: Boolean = false): DecodeResult
fun detectAndDecodeResult(img: Mat, isOutputVertices: Boolean = false): DecodeResult

Both detects and decodes QR code, and returns DecodeResult directly.

Link copied to clipboard

get scale factor

Link copied to clipboard
fun init(context: Context)

初始化

Link copied to clipboard
fun setScaleFactor(scalingFactor: Float)

set scale factor QR code detector use neural network to detect QR. Before running the neural network, the input image is pre-processed by scaling. By default, the input image is scaled to an image with an area of 160000 pixels. The scale factor allows to use custom scale the input image: width = scaleFactorwidth height = scaleFactorwidth