#include <opencv2/objdetect/barcode.hpp>
|
| BarcodeDetector () |
| Initialize the BarcodeDetector. More...
|
|
| BarcodeDetector (const std::string &prototxt_path, const std::string &model_path) |
| Initialize the BarcodeDetector. More...
|
|
| ~BarcodeDetector () |
|
bool | decodeWithType (InputArray img, InputArray points, std::vector< std::string > &decoded_info, std::vector< std::string > &decoded_type) const |
| Decodes barcode in image once it's found by the detect() method. More...
|
|
bool | detectAndDecodeWithType (InputArray img, std::vector< std::string > &decoded_info, std::vector< std::string > &decoded_type, OutputArray points=noArray()) const |
| Both detects and decodes barcode. More...
|
|
| GraphicalCodeDetector () |
|
| GraphicalCodeDetector (const GraphicalCodeDetector &)=default |
|
| GraphicalCodeDetector (GraphicalCodeDetector &&)=default |
|
std::string | decode (InputArray img, InputArray points, OutputArray straight_code=noArray()) const |
| Decodes graphical code in image once it's found by the detect() method. More...
|
|
bool | decodeMulti (InputArray img, InputArray points, std::vector< std::string > &decoded_info, OutputArrayOfArrays straight_code=noArray()) const |
| Decodes graphical codes in image once it's found by the detect() method. More...
|
|
bool | detect (InputArray img, OutputArray points) const |
| Detects graphical code in image and returns the quadrangle containing the code. More...
|
|
std::string | detectAndDecode (InputArray img, OutputArray points=noArray(), OutputArray straight_code=noArray()) const |
| Both detects and decodes graphical code. More...
|
|
bool | detectAndDecodeMulti (InputArray img, std::vector< std::string > &decoded_info, OutputArray points=noArray(), OutputArrayOfArrays straight_code=noArray()) const |
| Both detects and decodes graphical codes. More...
|
|
bool | detectMulti (InputArray img, OutputArray points) const |
| Detects graphical codes in image and returns the vector of the quadrangles containing the codes. More...
|
|
GraphicalCodeDetector & | operator= (const GraphicalCodeDetector &)=default |
|
GraphicalCodeDetector & | operator= (GraphicalCodeDetector &&)=default |
|
◆ BarcodeDetector() [1/2]
cv::barcode::BarcodeDetector::BarcodeDetector |
( |
| ) |
|
◆ BarcodeDetector() [2/2]
cv::barcode::BarcodeDetector::BarcodeDetector |
( |
const std::string & |
prototxt_path, |
|
|
const std::string & |
model_path |
|
) |
| |
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 |
◆ ~BarcodeDetector()
cv::barcode::BarcodeDetector::~BarcodeDetector |
( |
| ) |
|
◆ decodeWithType()
bool cv::barcode::BarcodeDetector::decodeWithType |
( |
InputArray |
img, |
|
|
InputArray |
points, |
|
|
std::vector< std::string > & |
decoded_info, |
|
|
std::vector< std::string > & |
decoded_type |
|
) |
| const |
Python: |
---|
| cv.barcode.BarcodeDetector.decodeWithType( | img, points | ) -> | retval, decoded_info, decoded_type |
Decodes barcode in image once it's found by the detect() method.
- Parameters
-
img | grayscale or color (BGR) image containing bar code. |
points | vector of rotated rectangle vertices found by detect() method (or some other algorithm). For N detected barcodes, the dimensions of this array should be [N][4]. Order of four points in vector<Point2f> is bottomLeft, topLeft, topRight, bottomRight. |
decoded_info | UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded. |
decoded_type | vector strings, specifies the type of these barcodes |
- Returns
- true if at least one valid barcode have been found
◆ detectAndDecodeWithType()
bool cv::barcode::BarcodeDetector::detectAndDecodeWithType |
( |
InputArray |
img, |
|
|
std::vector< std::string > & |
decoded_info, |
|
|
std::vector< std::string > & |
decoded_type, |
|
|
OutputArray |
points = noArray() |
|
) |
| const |
Python: |
---|
| cv.barcode.BarcodeDetector.detectAndDecodeWithType( | img[, points] | ) -> | retval, decoded_info, decoded_type, points |
Both detects and decodes barcode.
- Parameters
-
img | grayscale or color (BGR) image containing barcode. |
decoded_info | UTF8-encoded output vector of string(s) or empty vector of string if the codes cannot be decoded. |
decoded_type | vector of strings, specifies the type of these barcodes |
points | optional output vector of vertices of the found barcode rectangle. Will be empty if not found. |
- Returns
- true if at least one valid barcode have been found
The documentation for this class was generated from the following file: