OpenCV  5.0.0-pre
Open Source Computer Vision
Public Member Functions | Protected Attributes | List of all members
cv::wechat_qrcode::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...

#include <opencv2/wechat_qrcode.hpp>

Public Member Functions

 WeChatQRCode (const std::string &detector_prototxt_path="", const std::string &detector_caffe_model_path="", const std::string &super_resolution_prototxt_path="", const std::string &super_resolution_caffe_model_path="")
 Initialize the WeChatQRCode. It includes two models, which are packaged with caffe format. Therefore, there are prototxt and caffe models (In total, four paramenters). More...
 
 ~WeChatQRCode ()
 
std::vector< std::string > detectAndDecode (InputArray img, OutputArrayOfArrays points=noArray())
 Both detects and decodes QR code. To simplify the usage, there is a only API: detectAndDecode. More...
 

Protected Attributes

Ptr< Impl > p
 

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()

cv::wechat_qrcode::WeChatQRCode::WeChatQRCode ( const std::string &  detector_prototxt_path = "",
const std::string &  detector_caffe_model_path = "",
const std::string &  super_resolution_prototxt_path = "",
const std::string &  super_resolution_caffe_model_path = "" 
)

Initialize the WeChatQRCode. It includes two models, which are packaged with caffe format. Therefore, there are prototxt and caffe models (In total, four paramenters).

Parameters
detector_prototxt_pathprototxt file path for the detector
detector_caffe_model_pathcaffe model file path for the detector
super_resolution_prototxt_pathprototxt file path for the super resolution model
super_resolution_caffe_model_pathcaffe file path for the super resolution model

◆ ~WeChatQRCode()

cv::wechat_qrcode::WeChatQRCode::~WeChatQRCode ( )
inline

Member Function Documentation

◆ detectAndDecode()

std::vector<std::string> cv::wechat_qrcode::WeChatQRCode::detectAndDecode ( InputArray  img,
OutputArrayOfArrays  points = noArray() 
)
Python:
cv.wechat_qrcode.WeChatQRCode.detectAndDecode(img[, points=None]) -> retval, 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.

Member Data Documentation

◆ p

Ptr<Impl> cv::wechat_qrcode::WeChatQRCode::p
protected

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