WeChat QRCode 包括两个基于 CNN 的模型:一个对象检测模型和一个超分辨率模型。 对象检测模型用于检测带有边界框的 QRCode。 超分辨率模型用于放大较小的 QRCode。 更多...
#include <opencv2/wechat_qrcode.hpp>
|
| | 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="") |
| | 初始化 WeChatQRCode。 它包括两个模型,它们以 caffe 格式打包。 因此,存在 prototxt 和 caffe 模型(总共四个参数)。
|
| |
| | ~WeChatQRCode () |
| |
| std::vector< std::string > | detectAndDecode (InputArray img, OutputArrayOfArrays points=noArray()) |
| | 同时检测和解码二维码。 为了简化使用,只有一个 API:detectAndDecode。
|
| |
| float | getScaleFactor () |
| |
| void | setScaleFactor (float _scalingFactor) |
| | 设置缩放因子二维码检测器使用神经网络来检测二维码。 在运行神经网络之前,通过缩放对输入图像进行预处理。 默认情况下,输入图像被缩放到面积为 160000 像素的图像。 缩放因子允许使用自定义缩放输入图像:width = scaleFactor*width height = scaleFactor*width
|
| |
WeChat QRCode 包括两个基于 CNN 的模型:一个对象检测模型和一个超分辨率模型。 对象检测模型用于检测带有边界框的 QRCode。 超分辨率模型用于放大较小的 QRCode。
◆ 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 = "" ) |
| Python |
|---|
| cv.wechat_qrcode.WeChatQRCode( | [, detector_prototxt_path[, detector_caffe_model_path[, super_resolution_prototxt_path[, super_resolution_caffe_model_path]]]] | ) -> | <wechat_qrcode_WeChatQRCode object> |
初始化 WeChatQRCode。 它包括两个模型,它们以 caffe 格式打包。 因此,存在 prototxt 和 caffe 模型(总共四个参数)。
- 参数
-
| detector_prototxt_path | 检测器的 prototxt 文件路径 |
| detector_caffe_model_path | 检测器的 caffe 模型文件路径 |
| super_resolution_prototxt_path | 超分辨率模型的 prototxt 文件路径 |
| super_resolution_caffe_model_path | 超分辨率模型的 caffe 文件路径 |
◆ ~WeChatQRCode()
| cv::wechat_qrcode::WeChatQRCode::~WeChatQRCode |
( |
| ) |
|
|
inline |
◆ detectAndDecode()
| Python |
|---|
| cv.wechat_qrcode.WeChatQRCode.detectAndDecode( | img[, points] | ) -> | retval, points |
同时检测和解码二维码。 为了简化使用,只有一个 API:detectAndDecode。
- 参数
-
| img | 支持灰度或彩色 (BGR) 图像。 |
| points | 找到的二维码四边形顶点的可选输出数组。 如果未找到,将为空。 |
- 返回
- 解码字符串列表。
◆ getScaleFactor()
| float cv::wechat_qrcode::WeChatQRCode::getScaleFactor |
( |
| ) |
|
| Python |
|---|
| cv.wechat_qrcode.WeChatQRCode.getScaleFactor( | | ) -> | retval |
◆ setScaleFactor()
| void cv::wechat_qrcode::WeChatQRCode::setScaleFactor |
( |
float | _scalingFactor | ) |
|
| Python |
|---|
| cv.wechat_qrcode.WeChatQRCode.setScaleFactor( | _scalingFactor | ) -> | 无 |
设置缩放因子二维码检测器使用神经网络来检测二维码。 在运行神经网络之前,通过缩放对输入图像进行预处理。 默认情况下,输入图像被缩放到面积为 160000 像素的图像。 缩放因子允许使用自定义缩放输入图像:width = scaleFactor*width height = scaleFactor*width
scaleFactor 值必须 > 0 且 <= 1,否则 scaleFactor 值将设置为 -1 并使用默认值缩放到面积为 160000 像素的图像。
| Ptr<Impl> cv::wechat_qrcode::WeChatQRCode::p |
|
保护 |
此类文档由以下文件生成