Struct opencv::wechat_qrcode::WeChatQRCode
source · [−]pub struct WeChatQRCode { /* private fields */ }Expand 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.
Implementations
sourceimpl WeChatQRCode
impl WeChatQRCode
sourcepub fn new(
detector_prototxt_path: &str,
detector_caffe_model_path: &str,
super_resolution_prototxt_path: &str,
super_resolution_caffe_model_path: &str
) -> Result<WeChatQRCode>
pub fn new(
detector_prototxt_path: &str,
detector_caffe_model_path: &str,
super_resolution_prototxt_path: &str,
super_resolution_caffe_model_path: &str
) -> Result<WeChatQRCode>
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_path: prototxt file path for the detector
- detector_caffe_model_path: caffe model file path for the detector
- super_resolution_prototxt_path: prototxt file path for the super resolution model
- super_resolution_caffe_model_path: caffe file path for the super resolution model
C++ default parameters
- detector_prototxt_path: “”
- detector_caffe_model_path: “”
- super_resolution_prototxt_path: “”
- super_resolution_caffe_model_path: “”
Trait Implementations
sourceimpl Boxed for WeChatQRCode
impl Boxed for WeChatQRCode
sourceimpl Drop for WeChatQRCode
impl Drop for WeChatQRCode
sourceimpl WeChatQRCodeTrait for WeChatQRCode
impl WeChatQRCodeTrait for WeChatQRCode
fn as_raw_mut_WeChatQRCode(&mut self) -> *mut c_void
sourcefn detect_and_decode(
&mut self,
img: &dyn ToInputArray,
points: &mut dyn ToOutputArray
) -> Result<Vector<String>>
fn detect_and_decode(
&mut self,
img: &dyn ToInputArray,
points: &mut dyn ToOutputArray
) -> Result<Vector<String>>
Both detects and decodes QR code.
To simplify the usage, there is a only API: detectAndDecode Read more
sourceimpl WeChatQRCodeTraitConst for WeChatQRCode
impl WeChatQRCodeTraitConst for WeChatQRCode
fn as_raw_WeChatQRCode(&self) -> *const c_void
impl Send for WeChatQRCode
Auto Trait Implementations
impl RefUnwindSafe for WeChatQRCode
impl !Sync for WeChatQRCode
impl Unpin for WeChatQRCode
impl UnwindSafe for WeChatQRCode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more