OpenCV453
公開メンバ関数 | 限定公開変数類 | 全メンバ一覧
cv::barcode::BarcodeDetector クラス

公開メンバ関数

CV_WRAP BarcodeDetector (const std::string &prototxt_path="", const std::string &model_path="")
 Initialize the BarcodeDetector. [詳解]
 
CV_WRAP bool detect (InputArray img, OutputArray points) const
 Detects Barcode in image and returns the rectangle(s) containing the code. [詳解]
 
CV_WRAP bool decode (InputArray img, InputArray points, CV_OUT std::vector< std::string > &decoded_info, CV_OUT std::vector< BarcodeType > &decoded_type) const
 Decodes barcode in image once it's found by the detect() method. [詳解]
 
CV_WRAP bool detectAndDecode (InputArray img, CV_OUT std::vector< std::string > &decoded_info, CV_OUT std::vector< BarcodeType > &decoded_type, OutputArray points=noArray()) const
 Both detects and decodes barcode [詳解]
 

限定公開変数類

Ptr< Impl > p
 

構築子と解体子

◆ BarcodeDetector()

CV_WRAP cv::barcode::BarcodeDetector::BarcodeDetector ( const std::string &  prototxt_path = "",
const std::string &  model_path = "" 
)

Initialize the BarcodeDetector.

引数
prototxt_pathprototxt file path for the super resolution model
model_pathmodel file path for the super resolution model

関数詳解

◆ decode()

CV_WRAP bool cv::barcode::BarcodeDetector::decode ( InputArray  img,
InputArray  points,
CV_OUT std::vector< std::string > &  decoded_info,
CV_OUT std::vector< BarcodeType > &  decoded_type 
) const

Decodes barcode in image once it's found by the detect() method.

引数
imggrayscale or color (BGR) image containing bar code.
pointsvector 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_infoUTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.
decoded_typevector of BarcodeType, specifies the type of these barcodes

◆ detect()

CV_WRAP bool cv::barcode::BarcodeDetector::detect ( InputArray  img,
OutputArray  points 
) const

Detects Barcode in image and returns the rectangle(s) containing the code.

引数
imggrayscale or color (BGR) image containing (or not) Barcode.
pointsOutput vector of vector of vertices of the minimum-area rotated rectangle containing the codes. 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.

◆ detectAndDecode()

CV_WRAP bool cv::barcode::BarcodeDetector::detectAndDecode ( InputArray  img,
CV_OUT std::vector< std::string > &  decoded_info,
CV_OUT std::vector< BarcodeType > &  decoded_type,
OutputArray  points = noArray() 
) const

Both detects and decodes barcode

引数
imggrayscale or color (BGR) image containing barcode.
decoded_infoUTF8-encoded output vector of string(s) or empty vector of string if the codes cannot be decoded.
decoded_typevector of BarcodeType, specifies the type of these barcodes
pointsoptional output vector of vertices of the found barcode rectangle. Will be empty if not found.

このクラス詳解は次のファイルから抽出されました: