OpenCV 4.12.0
開源計算機視覺
載入中...
搜尋中...
無匹配項
cv::wechat_qrcode::WeChatQRCode 類參考

WeChat QRCode 包括兩個基於 CNN 的模型:一個物件檢測模型和一個超解析度模型。 物件檢測模型用於檢測帶有邊界框的 QRCode。 超解析度模型用於放大較小的 QRCode。 更多...

#include <opencv2/wechat_qrcode.hpp>

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="")
 初始化 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
 

保護屬性

Ptr< Impl > p
 

詳細描述

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

std::vector< std::string > cv::wechat_qrcode::WeChatQRCode::detectAndDecode ( InputArray img,
OutputArrayOfArrays points = noArray() )
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 畫素的影像。

成員資料文件

◆ p

Ptr<Impl> cv::wechat_qrcode::WeChatQRCode::p
保護

此類文件由以下檔案生成