🤖
AIによる機械翻訳(非公式) — これは OpenCV 4.13.0 公式リファレンス(英語)を AI (Claude) で自動翻訳したものです。訳に誤りを含む場合があります。正確な情報は
公式英語版(原文) を参照してください。
#include <opencv2/objdetect/barcode.hpp>
|
| | BarcodeDetector () |
| | BarcodeDetector を初期化する。
|
| |
| | BarcodeDetector (CV_WRAP_FILE_PATH const std::string &prototxt_path, CV_WRAP_FILE_PATH const std::string &model_path) |
| | BarcodeDetector を初期化する。
|
| |
| | ~BarcodeDetector () |
| |
| bool | decodeWithType (InputArray img, InputArray points, std::vector< std::string > &decoded_info, std::vector< std::string > &decoded_type) const |
| | detect() メソッドでバーコードが見つかった後、画像内のバーコードをデコードする。
|
| |
| bool | detectAndDecodeWithType (InputArray img, std::vector< std::string > &decoded_info, std::vector< std::string > &decoded_type, OutputArray points=noArray()) const |
| | バーコードの検出とデコードの両方を行う。
|
| |
| void | getDetectorScales (std::vector< float > &sizes) const |
| | 検出器のボックスフィルタのサイズを返す。
|
| |
| double | getDownsamplingThreshold () const |
| | 検出器のダウンサンプリングしきい値を取得する。
|
| |
| double | getGradientThreshold () const |
| | 検出器の勾配の大きさのしきい値を取得する。
|
| |
| BarcodeDetector & | setDetectorScales (const std::vector< float > &sizes) |
| | 検出器のボックスフィルタのサイズを設定する。
|
| |
| BarcodeDetector & | setDownsamplingThreshold (double thresh) |
| | 検出器のダウンサンプリングしきい値を設定する。
|
| |
| BarcodeDetector & | setGradientThreshold (double thresh) |
| | 検出器の勾配の大きさのしきい値を設定する。
|
| |
| | GraphicalCodeDetector () |
| |
| | GraphicalCodeDetector (const GraphicalCodeDetector &)=default |
| |
| | GraphicalCodeDetector (GraphicalCodeDetector &&)=default |
| |
| std::string | decode (InputArray img, InputArray points, OutputArray straight_code=noArray()) const |
| | detect() メソッドでグラフィカルコードが見つかった後、画像内のそれをデコードする。
|
| |
| bool | decodeMulti (InputArray img, InputArray points, std::vector< std::string > &decoded_info, OutputArrayOfArrays straight_code=noArray()) const |
| | detect() メソッドでグラフィカルコードが見つかった後、画像内のそれらをデコードする。
|
| |
| bool | detect (InputArray img, OutputArray points) const |
| | 画像内のグラフィカルコードを検出し、そのコードを含む四角形を返す。
|
| |
| std::string | detectAndDecode (InputArray img, OutputArray points=noArray(), OutputArray straight_code=noArray()) const |
| | グラフィカルコードの検出とデコードの両方を行う。
|
| |
| bool | detectAndDecodeMulti (InputArray img, std::vector< std::string > &decoded_info, OutputArray points=noArray(), OutputArrayOfArrays straight_code=noArray()) const |
| | グラフィカルコードの検出とデコードの両方を行う。
|
| |
| bool | detectMulti (InputArray img, OutputArray points) const |
| | 画像内のグラフィカルコードを検出し、そのコードを含む四角形のベクトルを返す。
|
| |
| GraphicalCodeDetector & | operator= (const GraphicalCodeDetector &)=default |
| |
| GraphicalCodeDetector & | operator= (GraphicalCodeDetector &&)=default |
| |
◆ BarcodeDetector() [1/2]
| cv::barcode::BarcodeDetector::BarcodeDetector |
( |
| ) |
|
| Python: |
|---|
| cv.barcode.BarcodeDetector( | | ) -> | <barcode_BarcodeDetector object> |
| cv.barcode.BarcodeDetector( | prototxt_path, model_path | ) -> | <barcode_BarcodeDetector object> |
◆ BarcodeDetector() [2/2]
| Python: |
|---|
| cv.barcode.BarcodeDetector( | | ) -> | <barcode_BarcodeDetector object> |
| cv.barcode.BarcodeDetector( | prototxt_path, model_path | ) -> | <barcode_BarcodeDetector object> |
BarcodeDetector を初期化する。
引数により、より高品質な結果を得るための省略可能な超解像 DNN モデルを読み込める。
- 引数
-
| prototxt_path | 超解像モデル用の prototxt ファイルのパス |
| model_path | 超解像モデル用のモデルファイルのパス |
◆ ~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 |
detect() メソッドでバーコードが見つかった後、画像内のバーコードをデコードする。
- 引数
-
| img | バーコードを含むグレースケールまたはカラー(BGR)の画像。 |
| points | detect() メソッド(または他のアルゴリズム)で見つかった回転矩形の頂点のベクトル。検出されたバーコードが N 個の場合、この配列の次元は [N][4] であるべきである。vector<Point2f> における4点の順序は bottomLeft, topLeft, topRight, bottomRight である。 |
| decoded_info | UTF8エンコードされた出力文字列ベクトル。コードが復号できない場合は空の文字列ベクトル。 |
| decoded_type | これらのバーコードの種類を指定する文字列のベクトル |
- 戻り値
- 少なくとも1つの有効なバーコードが見つかった場合に true
◆ 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 |
バーコードの検出とデコードの両方を行う。
- 引数
-
| img | バーコードを含むグレースケールまたはカラー(BGR)の画像。 |
| decoded_info | UTF8 エンコードされた出力文字列のベクトル。コードがデコードできない場合は空の文字列ベクトルとなる。 |
| decoded_type | これらのバーコードの種類を指定する文字列のベクトル |
| points | 見つかったバーコード矩形の頂点を返す省略可能な出力ベクトル。見つからない場合は空となる。 |
- 戻り値
- 少なくとも1つの有効なバーコードが見つかった場合に true
◆ getDetectorScales()
| void cv::barcode::BarcodeDetector::getDetectorScales |
( |
std::vector< float > & | sizes | ) |
const |
| Python: |
|---|
| cv.barcode.BarcodeDetector.getDetectorScales( | | ) -> | sizes |
◆ getDownsamplingThreshold()
| double cv::barcode::BarcodeDetector::getDownsamplingThreshold |
( |
| ) |
const |
| Python: |
|---|
| cv.barcode.BarcodeDetector.getDownsamplingThreshold( | | ) -> | retval |
検出器のダウンサンプリングしきい値を取得する。
- 戻り値
- 検出器のダウンサンプリングしきい値
◆ getGradientThreshold()
| double cv::barcode::BarcodeDetector::getGradientThreshold |
( |
| ) |
const |
| Python: |
|---|
| cv.barcode.BarcodeDetector.getGradientThreshold( | | ) -> | retval |
検出器の勾配の大きさのしきい値を取得する。
- 戻り値
- 検出器の勾配の大きさのしきい値。
◆ setDetectorScales()
| BarcodeDetector & cv::barcode::BarcodeDetector::setDetectorScales |
( |
const std::vector< float > & | sizes | ) |
|
| Python: |
|---|
| cv.barcode.BarcodeDetector.setDetectorScales( | sizes | ) -> | retval |
検出器のボックスフィルタのサイズを設定する。
検出ステップで使用するボックスフィルタの値と個数を調整する。フィルタサイズはバーコードの期待される線幅と直接相関する。期待されるバーコードの距離に対応する。ダウンサンプリングの上限を増やす場合、フィルタサイズは反比例の形で調整する必要がある。
- 引数
-
| sizes | ボックスフィルタのサイズ。画像の最小寸法に対する相対値(デフォルト [0.01, 0.03, 0.06, 0.08]) |
◆ setDownsamplingThreshold()
| BarcodeDetector & cv::barcode::BarcodeDetector::setDownsamplingThreshold |
( |
double | thresh | ) |
|
| Python: |
|---|
| cv.barcode.BarcodeDetector.setDownsamplingThreshold( | thresh | ) -> | retval |
検出器のダウンサンプリングしきい値を設定する。
デフォルトでは、最小の画像サイズがしきい値より大きい場合、detect メソッドは入力画像をこの上限にリサイズする。この値を増やすと、性能を犠牲にして検出精度と結果の数を向上できる。検出器のスケールと相関する。これを大きな値に設定するとダウンサンプリングが無効になる。
- 引数
-
| thresh | 適用するダウンサンプリングの上限(デフォルト 512) |
- 参照
- setDetectorScales
◆ setGradientThreshold()
| BarcodeDetector & cv::barcode::BarcodeDetector::setGradientThreshold |
( |
double | thresh | ) |
|
| Python: |
|---|
| cv.barcode.BarcodeDetector.setGradientThreshold( | thresh | ) -> | retval |
検出器の勾配の大きさのしきい値を設定する。
検出されたバウンディングボックスのコヒーレンスしきい値を設定する。この値を増やすと、より密に適合したバウンディングボックスの幅が生成され、偽陽性を減らすことができる。一般に 16 から 1024 の間の値が機能するが、値が高すぎると有効な検出が除外される。
- 引数
-
| thresh | 勾配の大きさのしきい値(デフォルト 64)。 |
このクラス詳解は次のファイルから抽出されました: