OpenCV 4.5.3(日本語機械翻訳)
公開メンバ関数 | 限定公開変数類 | 全メンバ一覧
cv::barcode::BarcodeDetector クラス

公開メンバ関数

CV_WRAP BarcodeDetector (const std::string &prototxt_path="", const std::string &model_path="")
を初期化します.BarcodeDetector.[【詳解】(英語]
CV_WRAP bool detect (InputArray img, OutputArray points) const
画像中のバーコードを検出して,そのコードを含む矩形(複数可)を返します。[【詳解】(英語]
CV_WRAP bool decode (InputArray img, InputArray points, CV_OUT std::vector< std::string > &decoded_info, CV_OUT std::vector< BarcodeType > &decoded_type) const
メソッドで検出された画像のバーコードをデコードします。detect()メソッドを実行します。[【詳解】(英語]
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
バーコードの検出とデコードの両方を行う[【詳解】(英語]

限定公開変数類

Ptr< Impl > p

構築子と解体子

BarcodeDetector()

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

を初期化します.BarcodeDetector.

引数
prototxt_path 超解像モデルのprototxtファイルのパス
model_path 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

メソッドで検出された画像のバーコードをデコードします。detect()メソッドを実行します。

引数
img バーコードを含むグレースケールまたはカラー(BGR)画像.
points メソッド(または他のアルゴリズム)によって見つけられた,回転した矩形の頂点のベクトル.detect()メソッド(または他のアルゴリズム)によって見つけられた回転した長方形の頂点のベクトル。検出されたバーコードが N 個の場合,この配列の寸法は [N][4] となります.vector<Point2f>の4つの点の順序は,bottomLeft, topLeft, topRight, bottomRightです。
decoded_info UTF8でエンコードされた文字列の出力ベクトル、またはコードがデコードできない場合は空の文字列のベクトルです。
decoded_type これらのバーコードの種類を指定する,BarcodeTypeのベクトル

detect()

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

画像中のバーコードを検出して,そのコードを含む矩形(複数可)を返します。

引数
img バーコードを含む(または含まない)グレースケールまたはカラー(BGR)画像。
points コードを含む最小面積の回転した長方形の頂点のベクトルを出力します。検出されたバーコードが N 個の場合,この配列の寸法は [N][4] となります。vector< Point2f> の 4 点の順序は,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

バーコードの検出とデコードの両方を行う

引数
img バーコードを含むグレースケールまたはカラー(BGR)画像。
decoded_info UTF8でエンコードされた文字列の出力ベクトル,またはコードがデコードできない場合は空の文字列のベクトル
decoded_type これらのバーコードの種類を指定する,BarcodeTypeのベクトル
points 見つかったバーコードの矩形の頂点を表す出力ベクトル(オプション)。見つからない場合は空になります。

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