OpenCV for Unity 3.0.4
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/5.0/index.html ) for the details of the argument of the method.
Loading...
Searching...
No Matches
OpenCVForUnity.Wechat_qrcodeModule.WeChatQRCode Class Reference

WeChat QRCode includes two CNN-based models: A object detection model and a super resolution model. Object detection model is applied to detect QRCode with the bounding box. super resolution model is applied to zoom in QRCode when it is small. More...

Public Member Functions

 WeChatQRCode ()
 Initialize the WeChatQRCode. It includes two CNN-based models in ONNX format: a detector model and a super resolution model.
 
 WeChatQRCode (string detector_model_path)
 Initialize the WeChatQRCode. It includes two CNN-based models in ONNX format: a detector model and a super resolution model.
 
 WeChatQRCode (string detector_model_path, string super_resolution_model_path)
 Initialize the WeChatQRCode. It includes two CNN-based models in ONNX format: a detector model and a super resolution model.
 
List< string > detectAndDecode (Mat img)
 Both detects and decodes QR code. To simplify the usage, there is a only API: detectAndDecode.
 
List< string > detectAndDecode (Mat img, List< Mat > points)
 Both detects and decodes QR code. To simplify the usage, there is a only API: detectAndDecode.
 
IntPtr getNativeObjAddr ()
 
float getScaleFactor ()
 
void setScaleFactor (float _scalingFactor)
 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 = scaleFactor*width height = scaleFactor*width
 
- Public Member Functions inherited from OpenCVForUnity.DisposableObject
void Dispose ()
 Releases resources used by this object.
 
void ThrowIfDisposed ()
 Throws ObjectDisposedException if this object has been disposed.
 

Static Public Member Functions

static WeChatQRCode __fromPtr__ (IntPtr addr)
 
- Static Public Member Functions inherited from OpenCVForUnity.DisposableObject
static IntPtr ThrowIfNullIntPtr (IntPtr ptr)
 Returns the native pointer, or throws CoreModule.CvException if it is zero.
 

Protected Member Functions

override void Dispose (bool disposing)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableOpenCVObject
 DisposableOpenCVObject ()
 Initializes a new instance with a zero native pointer and dispose enabled.
 
 DisposableOpenCVObject (bool isEnabledDispose)
 Initializes a new instance with a zero native pointer.
 
 DisposableOpenCVObject (IntPtr ptr)
 Initializes a new instance with the specified native pointer and dispose enabled.
 
 DisposableOpenCVObject (IntPtr ptr, bool isEnabledDispose)
 Initializes a new instance with the specified native pointer.
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableObject
 DisposableObject ()
 Initializes a new instance with dispose enabled.
 
 DisposableObject (bool isEnabledDispose)
 Initializes a new instance.
 

Additional Inherited Members

- Package Attributes inherited from OpenCVForUnity.DisposableOpenCVObject
- Properties inherited from OpenCVForUnity.DisposableObject
bool IsDisposed [get, protected set]
 
bool IsEnabledDispose [get, set]
 

Detailed Description

WeChat QRCode includes two CNN-based models: A object detection model and a super resolution model. Object detection model is applied to detect QRCode with the bounding box. super resolution model is applied to zoom in QRCode when it is small.

Constructor & Destructor Documentation

◆ WeChatQRCode() [1/3]

OpenCVForUnity.Wechat_qrcodeModule.WeChatQRCode.WeChatQRCode ( string detector_model_path,
string super_resolution_model_path )

Initialize the WeChatQRCode. It includes two CNN-based models in ONNX format: a detector model and a super resolution model.

Parameters
detector_model_pathonnx model file path for the detector
super_resolution_model_pathonnx model file path for the super resolution model

◆ WeChatQRCode() [2/3]

OpenCVForUnity.Wechat_qrcodeModule.WeChatQRCode.WeChatQRCode ( string detector_model_path)

Initialize the WeChatQRCode. It includes two CNN-based models in ONNX format: a detector model and a super resolution model.

Parameters
detector_model_pathonnx model file path for the detector
super_resolution_model_pathonnx model file path for the super resolution model

◆ WeChatQRCode() [3/3]

OpenCVForUnity.Wechat_qrcodeModule.WeChatQRCode.WeChatQRCode ( )

Initialize the WeChatQRCode. It includes two CNN-based models in ONNX format: a detector model and a super resolution model.

Parameters
detector_model_pathonnx model file path for the detector
super_resolution_model_pathonnx model file path for the super resolution model

Member Function Documentation

◆ __fromPtr__()

static WeChatQRCode OpenCVForUnity.Wechat_qrcodeModule.WeChatQRCode.__fromPtr__ ( IntPtr addr)
static

◆ detectAndDecode() [1/2]

List< string > OpenCVForUnity.Wechat_qrcodeModule.WeChatQRCode.detectAndDecode ( Mat img)

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

Parameters
imgsupports grayscale or color (BGR) image.
pointsoptional output array of vertices of the found QR code quadrangle. Will be empty if not found.
Returns
list of decoded string.

◆ detectAndDecode() [2/2]

List< string > OpenCVForUnity.Wechat_qrcodeModule.WeChatQRCode.detectAndDecode ( Mat img,
List< Mat > points )

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

Parameters
imgsupports grayscale or color (BGR) image.
pointsoptional output array of vertices of the found QR code quadrangle. Will be empty if not found.
Returns
list of decoded string.

◆ Dispose()

override void OpenCVForUnity.Wechat_qrcodeModule.WeChatQRCode.Dispose ( bool disposing)
protectedvirtual

◆ getNativeObjAddr()

IntPtr OpenCVForUnity.Wechat_qrcodeModule.WeChatQRCode.getNativeObjAddr ( )

◆ getScaleFactor()

float OpenCVForUnity.Wechat_qrcodeModule.WeChatQRCode.getScaleFactor ( )

◆ setScaleFactor()

void OpenCVForUnity.Wechat_qrcodeModule.WeChatQRCode.setScaleFactor ( float _scalingFactor)

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 = scaleFactor*width height = scaleFactor*width

scaleFactor valuse must be > 0 and <= 1, otherwise the scaleFactor value is set to -1 and use default scaled to an image with an area of 160000 pixels.


The documentation for this class was generated from the following file: