pub struct BarcodeDetector { /* private fields */ }
Implementations§
Source§impl BarcodeDetector
impl BarcodeDetector
Sourcepub fn default() -> Result<BarcodeDetector>
pub fn default() -> Result<BarcodeDetector>
Initialize the BarcodeDetector.
Sourcepub fn new(prototxt_path: &str, model_path: &str) -> Result<BarcodeDetector>
pub fn new(prototxt_path: &str, model_path: &str) -> Result<BarcodeDetector>
Initialize the BarcodeDetector.
Parameters allow to load optional Super Resolution DNN model for better quality.
§Parameters
- prototxt_path: prototxt file path for the super resolution model
- model_path: model file path for the super resolution model
Trait Implementations§
Source§impl BarcodeDetectorTrait for BarcodeDetector
impl BarcodeDetectorTrait for BarcodeDetector
fn as_raw_mut_BarcodeDetector(&mut self) -> *mut c_void
Source§fn set_downsampling_threshold(&mut self, thresh: f64) -> Result<BarcodeDetector>
fn set_downsampling_threshold(&mut self, thresh: f64) -> Result<BarcodeDetector>
Set detector downsampling threshold. Read more
Source§fn set_detector_scales(
&mut self,
sizes: &Vector<f32>,
) -> Result<BarcodeDetector>
fn set_detector_scales( &mut self, sizes: &Vector<f32>, ) -> Result<BarcodeDetector>
Set detector box filter sizes. Read more
Source§fn set_gradient_threshold(&mut self, thresh: f64) -> Result<BarcodeDetector>
fn set_gradient_threshold(&mut self, thresh: f64) -> Result<BarcodeDetector>
Set detector gradient magnitude threshold. Read more
Source§impl BarcodeDetectorTraitConst for BarcodeDetector
impl BarcodeDetectorTraitConst for BarcodeDetector
fn as_raw_BarcodeDetector(&self) -> *const c_void
Source§fn decode_with_type(
&self,
img: &impl ToInputArray,
points: &impl ToInputArray,
decoded_info: &mut Vector<String>,
decoded_type: &mut Vector<String>,
) -> Result<bool>
fn decode_with_type( &self, img: &impl ToInputArray, points: &impl ToInputArray, decoded_info: &mut Vector<String>, decoded_type: &mut Vector<String>, ) -> Result<bool>
Decodes barcode in image once it’s found by the detect() method. Read more
Source§fn detect_and_decode_with_type(
&self,
img: &impl ToInputArray,
decoded_info: &mut Vector<String>,
decoded_type: &mut Vector<String>,
points: &mut impl ToOutputArray,
) -> Result<bool>
fn detect_and_decode_with_type( &self, img: &impl ToInputArray, decoded_info: &mut Vector<String>, decoded_type: &mut Vector<String>, points: &mut impl ToOutputArray, ) -> Result<bool>
Both detects and decodes barcode Read more
Source§fn detect_and_decode_with_type_def(
&self,
img: &impl ToInputArray,
decoded_info: &mut Vector<String>,
decoded_type: &mut Vector<String>,
) -> Result<bool>
fn detect_and_decode_with_type_def( &self, img: &impl ToInputArray, decoded_info: &mut Vector<String>, decoded_type: &mut Vector<String>, ) -> Result<bool>
Both detects and decodes barcode Read more
Source§fn get_downsampling_threshold(&self) -> Result<f64>
fn get_downsampling_threshold(&self) -> Result<f64>
Get detector downsampling threshold. Read more
Source§impl Boxed for BarcodeDetector
impl Boxed for BarcodeDetector
Source§unsafe fn from_raw(
ptr: <BarcodeDetector as OpenCVFromExtern>::ExternReceive,
) -> Self
unsafe fn from_raw( ptr: <BarcodeDetector as OpenCVFromExtern>::ExternReceive, ) -> Self
Wrap the specified raw pointer Read more
Source§fn into_raw(
self,
) -> <BarcodeDetector as OpenCVTypeExternContainer>::ExternSendMut
fn into_raw( self, ) -> <BarcodeDetector as OpenCVTypeExternContainer>::ExternSendMut
Return the underlying raw pointer while consuming this wrapper. Read more
Source§fn as_raw(&self) -> <BarcodeDetector as OpenCVTypeExternContainer>::ExternSend
fn as_raw(&self) -> <BarcodeDetector as OpenCVTypeExternContainer>::ExternSend
Return the underlying raw pointer. Read more
Source§fn as_raw_mut(
&mut self,
) -> <BarcodeDetector as OpenCVTypeExternContainer>::ExternSendMut
fn as_raw_mut( &mut self, ) -> <BarcodeDetector as OpenCVTypeExternContainer>::ExternSendMut
Return the underlying mutable raw pointer Read more
Source§impl Clone for BarcodeDetector
impl Clone for BarcodeDetector
Source§impl Debug for BarcodeDetector
impl Debug for BarcodeDetector
Source§impl Drop for BarcodeDetector
impl Drop for BarcodeDetector
Source§impl From<BarcodeDetector> for GraphicalCodeDetector
impl From<BarcodeDetector> for GraphicalCodeDetector
Source§fn from(s: BarcodeDetector) -> Self
fn from(s: BarcodeDetector) -> Self
Converts to this type from the input type.
Source§impl GraphicalCodeDetectorTrait for BarcodeDetector
impl GraphicalCodeDetectorTrait for BarcodeDetector
fn as_raw_mut_GraphicalCodeDetector(&mut self) -> *mut c_void
fn set(&mut self, unnamed: &impl GraphicalCodeDetectorTraitConst)
fn set_1(&mut self, unnamed: GraphicalCodeDetector)
Source§impl GraphicalCodeDetectorTraitConst for BarcodeDetector
impl GraphicalCodeDetectorTraitConst for BarcodeDetector
fn as_raw_GraphicalCodeDetector(&self) -> *const c_void
Source§fn detect(
&self,
img: &impl ToInputArray,
points: &mut impl ToOutputArray,
) -> Result<bool>
fn detect( &self, img: &impl ToInputArray, points: &mut impl ToOutputArray, ) -> Result<bool>
Detects graphical code in image and returns the quadrangle containing the code. Read more
Source§fn decode(
&self,
img: &impl ToInputArray,
points: &impl ToInputArray,
straight_code: &mut impl ToOutputArray,
) -> Result<Vec<u8>>
fn decode( &self, img: &impl ToInputArray, points: &impl ToInputArray, straight_code: &mut impl ToOutputArray, ) -> Result<Vec<u8>>
Decodes graphical code in image once it’s found by the detect() method. Read more
Source§fn decode_def(
&self,
img: &impl ToInputArray,
points: &impl ToInputArray,
) -> Result<Vec<u8>>
fn decode_def( &self, img: &impl ToInputArray, points: &impl ToInputArray, ) -> Result<Vec<u8>>
Decodes graphical code in image once it’s found by the detect() method. Read more
Source§fn detect_and_decode(
&self,
img: &impl ToInputArray,
points: &mut impl ToOutputArray,
straight_code: &mut impl ToOutputArray,
) -> Result<Vec<u8>>
fn detect_and_decode( &self, img: &impl ToInputArray, points: &mut impl ToOutputArray, straight_code: &mut impl ToOutputArray, ) -> Result<Vec<u8>>
Both detects and decodes graphical code Read more
Source§fn detect_and_decode_def(&self, img: &impl ToInputArray) -> Result<Vec<u8>>
fn detect_and_decode_def(&self, img: &impl ToInputArray) -> Result<Vec<u8>>
Both detects and decodes graphical code Read more
Source§fn detect_multi(
&self,
img: &impl ToInputArray,
points: &mut impl ToOutputArray,
) -> Result<bool>
fn detect_multi( &self, img: &impl ToInputArray, points: &mut impl ToOutputArray, ) -> Result<bool>
Detects graphical codes in image and returns the vector of the quadrangles containing the codes. Read more
Source§fn decode_multi(
&self,
img: &impl ToInputArray,
points: &impl ToInputArray,
decoded_info: &mut Vector<String>,
straight_code: &mut impl ToOutputArray,
) -> Result<bool>
fn decode_multi( &self, img: &impl ToInputArray, points: &impl ToInputArray, decoded_info: &mut Vector<String>, straight_code: &mut impl ToOutputArray, ) -> Result<bool>
Decodes graphical codes in image once it’s found by the detect() method. Read more
Source§fn decode_multi_def(
&self,
img: &impl ToInputArray,
points: &impl ToInputArray,
decoded_info: &mut Vector<String>,
) -> Result<bool>
fn decode_multi_def( &self, img: &impl ToInputArray, points: &impl ToInputArray, decoded_info: &mut Vector<String>, ) -> Result<bool>
Decodes graphical codes in image once it’s found by the detect() method. Read more
Source§fn detect_and_decode_multi(
&self,
img: &impl ToInputArray,
decoded_info: &mut Vector<String>,
points: &mut impl ToOutputArray,
straight_code: &mut impl ToOutputArray,
) -> Result<bool>
fn detect_and_decode_multi( &self, img: &impl ToInputArray, decoded_info: &mut Vector<String>, points: &mut impl ToOutputArray, straight_code: &mut impl ToOutputArray, ) -> Result<bool>
Both detects and decodes graphical codes Read more
Source§fn detect_and_decode_multi_def(
&self,
img: &impl ToInputArray,
decoded_info: &mut Vector<String>,
) -> Result<bool>
fn detect_and_decode_multi_def( &self, img: &impl ToInputArray, decoded_info: &mut Vector<String>, ) -> Result<bool>
Both detects and decodes graphical codes Read more
impl Send for BarcodeDetector
Auto Trait Implementations§
impl Freeze for BarcodeDetector
impl RefUnwindSafe for BarcodeDetector
impl !Sync for BarcodeDetector
impl Unpin for BarcodeDetector
impl UnwindSafe for BarcodeDetector
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Mat> ModifyInplace for Matwhere
Mat: Boxed,
impl<Mat> ModifyInplace for Matwhere
Mat: Boxed,
Source§unsafe fn modify_inplace<Res>(
&mut self,
f: impl FnOnce(&Mat, &mut Mat) -> Res,
) -> Res
unsafe fn modify_inplace<Res>( &mut self, f: impl FnOnce(&Mat, &mut Mat) -> Res, ) -> Res
Helper function to call OpenCV functions that allow in-place modification of a
Mat
or another similar object. By passing
a mutable reference to the Mat
to this function your closure will get called with the read reference and a write references
to the same Mat
. This is unsafe in a general case as it leads to having non-exclusive mutable access to the internal data,
but it can be useful for some performance sensitive operations. One example of an OpenCV function that allows such in-place
modification is imgproc::threshold
. Read more