OpenCV 4.13.0
Open Source Computer Vision
読み込み中...
検索中...
見つかりません
🤖 AIによる機械翻訳(非公式) — これは OpenCV 4.13.0 公式リファレンス(英語)を AI (Claude) で自動翻訳したものです。訳に誤りを含む場合があります。正確な情報は 公式英語版(原文) を参照してください。
cv::dnn::TextDetectionModel_DB クラス

このクラスは、DBモデルに対応したテキスト検出DLネットワーク向けの高水準APIを表す。続き...

#include <opencv2/dnn/dnn.hpp>

Collaboration diagram for cv::dnn::TextDetectionModel_DB:

公開メンバ関数

 TextDetectionModel_DB ()
 
 TextDetectionModel_DB (const Net &network)
 ディープラーニングネットワークからテキスト検出アルゴリズムを作成する。
 
 TextDetectionModel_DB (CV_WRAP_FILE_PATH const std::string &model, CV_WRAP_FILE_PATH const std::string &config="")
 サポートされている形式のいずれかで表現されたネットワークからテキスト検出モデルを作成する。modelconfig の引数の順序は問わない。
 
float getBinaryThreshold () const
 
int getMaxCandidates () const
 
float getPolygonThreshold () const
 
double getUnclipRatio () const
 
TextDetectionModel_DBsetBinaryThreshold (float binaryThreshold)
 
TextDetectionModel_DBsetMaxCandidates (int maxCandidates)
 
TextDetectionModel_DBsetPolygonThreshold (float polygonThreshold)
 
TextDetectionModel_DBsetUnclipRatio (double unclipRatio)
 
- Public Member Functions inherited from cv::dnn::TextDetectionModel
void detect (InputArray frame, std::vector< std::vector< Point > > &detections) const
 
void detect (InputArray frame, std::vector< std::vector< Point > > &detections, std::vector< float > &confidences) const
 検出を実行する。
 
void detectTextRectangles (InputArray frame, std::vector< cv::RotatedRect > &detections) const
 
void detectTextRectangles (InputArray frame, std::vector< cv::RotatedRect > &detections, std::vector< float > &confidences) const
 検出を実行する。
 
- Public Member Functions inherited from cv::dnn::Model
 Model ()
 
 Model (const Model &)=default
 
 Model (const Net &network)
 ディープラーニングのネットワークからモデルを作成する。
 
 Model (CV_WRAP_FILE_PATH const String &model, CV_WRAP_FILE_PATH const String &config="")
 サポートされている形式のいずれかで表現されたディープラーニングのネットワークからモデルを作成する。modelconfig 引数の順序は問わない。
 
 Model (Model &&)=default
 
ModelenableWinograd (bool useWinograd)
 
Impl * getImpl () const
 
Impl & getImplRef () const
 
NetgetNetwork_ ()
 
NetgetNetwork_ () const
 
 operator Net & () const
 
Modeloperator= (const Model &)=default
 
Modeloperator= (Model &&)=default
 
void predict (InputArray frame, OutputArrayOfArrays outs) const
 input フレームを与え、入力blobを作成し、netを実行して出力 blobs を返す。
 
ModelsetInputCrop (bool crop)
 フレームに対するcropフラグを設定する。
 
ModelsetInputMean (const Scalar &mean)
 フレームに対する平均値を設定する。
 
void setInputParams (double scale=1.0, const Size &size=Size(), const Scalar &mean=Scalar(), bool swapRB=false, bool crop=false)
 フレームの前処理パラメータを設定する。
 
ModelsetInputScale (const Scalar &scale)
 フレームのscalefactor値を設定する。
 
ModelsetInputSize (const Size &size)
 フレームの入力サイズを設定する。
 
ModelsetInputSize (int width, int height)
 
ModelsetInputSwapRB (bool swapRB)
 フレームのフラグswapRBを設定する。
 
ModelsetOutputNames (const std::vector< String > &outNames)
 フレームの出力名を設定する。
 
ModelsetPreferableBackend (dnn::Backend backendId)
 
ModelsetPreferableTarget (dnn::Target targetId)
 

Additional Inherited Members

- Protected Member Functions inherited from cv::dnn::TextDetectionModel
 TextDetectionModel ()
 
- Protected Attributes inherited from cv::dnn::Model
Ptr< Impl > impl
 

詳細説明

このクラスは、DBモデルに対応したテキスト検出DLネットワーク向けの高水準APIを表す。

関連文献: [172] 論文: https://arxiv.org/abs/1911.08947 ハイパーパラメータの設定について詳しくは、https://github.com/MhLiao/DB を参照すること

設定可能な引数:

  • (float) binaryThreshold - 二値マップのしきい値。通常は0.3に設定される。
  • (float) polygonThreshold - テキストポリゴンのしきい値。通常は0.5、0.6、0.7に設定される。デフォルトは0.5f
  • (double) unclipRatio - 検出されたテキスト領域のアンクリップ比であり、出力サイズを決定する。通常は2.0に設定される。
  • (int) maxCandidates - 出力結果の最大数。

構築子と解体子の詳解

◆ TextDetectionModel_DB() [1/3]

cv::dnn::TextDetectionModel_DB::TextDetectionModel_DB ( )
Python:
cv.dnn.TextDetectionModel_DB(network) -> <dnn_TextDetectionModel_DB object>
cv.dnn.TextDetectionModel_DB(model[, config]) -> <dnn_TextDetectionModel_DB object>

◆ TextDetectionModel_DB() [2/3]

cv::dnn::TextDetectionModel_DB::TextDetectionModel_DB ( const Net & network)
Python:
cv.dnn.TextDetectionModel_DB(network) -> <dnn_TextDetectionModel_DB object>
cv.dnn.TextDetectionModel_DB(model[, config]) -> <dnn_TextDetectionModel_DB object>

ディープラーニングネットワークからテキスト検出アルゴリズムを作成する。

引数
[in]networkNet オブジェクト。

◆ TextDetectionModel_DB() [3/3]

cv::dnn::TextDetectionModel_DB::TextDetectionModel_DB ( CV_WRAP_FILE_PATH const std::string & model,
CV_WRAP_FILE_PATH const std::string & config = "" )
inline
Python:
cv.dnn.TextDetectionModel_DB(network) -> <dnn_TextDetectionModel_DB object>
cv.dnn.TextDetectionModel_DB(model[, config]) -> <dnn_TextDetectionModel_DB object>

サポートされている形式のいずれかで表現されたネットワークからテキスト検出モデルを作成する。modelconfig の引数の順序は問わない。

引数
[in]model学習済みの重みを格納したバイナリファイル。
[in]configネットワーク構成を記述したテキストファイル。
この関数の呼び出しグラフ:

メンバ関数詳解

◆ getBinaryThreshold()

float cv::dnn::TextDetectionModel_DB::getBinaryThreshold ( ) const
Python:
cv.dnn.TextDetectionModel_DB.getBinaryThreshold() -> retval

◆ getMaxCandidates()

int cv::dnn::TextDetectionModel_DB::getMaxCandidates ( ) const
Python:
cv.dnn.TextDetectionModel_DB.getMaxCandidates() -> retval

◆ getPolygonThreshold()

float cv::dnn::TextDetectionModel_DB::getPolygonThreshold ( ) const
Python:
cv.dnn.TextDetectionModel_DB.getPolygonThreshold() -> retval

◆ getUnclipRatio()

double cv::dnn::TextDetectionModel_DB::getUnclipRatio ( ) const
Python:
cv.dnn.TextDetectionModel_DB.getUnclipRatio() -> retval

◆ setBinaryThreshold()

TextDetectionModel_DB & cv::dnn::TextDetectionModel_DB::setBinaryThreshold ( float binaryThreshold)
Python:
cv.dnn.TextDetectionModel_DB.setBinaryThreshold(binaryThreshold) -> retval

◆ setMaxCandidates()

TextDetectionModel_DB & cv::dnn::TextDetectionModel_DB::setMaxCandidates ( int maxCandidates)
Python:
cv.dnn.TextDetectionModel_DB.setMaxCandidates(maxCandidates) -> retval

◆ setPolygonThreshold()

TextDetectionModel_DB & cv::dnn::TextDetectionModel_DB::setPolygonThreshold ( float polygonThreshold)
Python:
cv.dnn.TextDetectionModel_DB.setPolygonThreshold(polygonThreshold) -> retval

◆ setUnclipRatio()

TextDetectionModel_DB & cv::dnn::TextDetectionModel_DB::setUnclipRatio ( double unclipRatio)
Python:
cv.dnn.TextDetectionModel_DB.setUnclipRatio(unclipRatio) -> retval

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