TextDetectorCNN クラスはテキストのバウンディングボックス検出機能を提供する。このクラスは、入力画像からテキストの単語のバウンディングボックスを見つけることを表す。このクラスはOpenCVのdnnモジュールを使用して、[170] で説明されている学習済みモデルを読み込む。修正版SSD Caffeを含むオリジナルのリポジトリ: https://github.com/MhLiao/TextBoxes。モデルはDropBoxからダウンロードできる。モデルの記述を含む修正版の.prototxtファイルはopencv_contrib/modules/text/samples/textbox.prototxtにある。 続きを読む...
#include <opencv2/text/textDetector.hpp>
TextDetectorCNN クラスはテキストのバウンディングボックス検出機能を提供する。このクラスは、入力画像からテキストの単語のバウンディングボックスを見つけることを表す。このクラスはOpenCVのdnnモジュールを使用して、[170] で説明されている学習済みモデルを読み込む。修正版SSD Caffeを含むオリジナルのリポジトリ: https://github.com/MhLiao/TextBoxes。モデルはDropBoxからダウンロードできる。モデルの記述を含む修正版の.prototxtファイルはopencv_contrib/modules/text/samples/textbox.prototxtにある。
◆ create() [1/2]
| Python: |
|---|
| cv.text.TextDetectorCNN.create( | modelArchFilename, modelWeightsFilename | ) -> | retval |
| cv.text.TextDetectorCNN_create( | modelArchFilename, modelWeightsFilename | ) -> | retval |
これは利便性のために提供されているオーバーロードされたメンバ関数である。上記の関数とは、受け取る引数のみが異なる。
◆ create() [2/2]
| static Ptr< TextDetectorCNN > cv::text::TextDetectorCNN::create |
( |
const String & | modelArchFilename, |
|
|
const String & | modelWeightsFilename, |
|
|
std::vector< Size > | detectionSizes ) |
|
static |
| Python: |
|---|
| cv.text.TextDetectorCNN.create( | modelArchFilename, modelWeightsFilename | ) -> | retval |
| cv.text.TextDetectorCNN_create( | modelArchFilename, modelWeightsFilename | ) -> | retval |
指定された引数を使用して TextDetectorCNN クラスのインスタンスを作成する。
- 引数
-
| modelArchFilename | 分類器のアーキテクチャを記述したprototxtファイルへの相対パスまたは絶対パス。 |
| modelWeightsFilename | caffeバイナリ形式で学習済みモデルの重みを格納したファイルへの相対パスまたは絶対パス。 |
| detectionSizes | マルチスケール検出用のサイズのリスト。最良の品質を得るには、[170] で値[(300,300),(700,500),(700,300),(700,700),(1600,1600)]が推奨されている。 |
◆ detect()
| virtual void cv::text::TextDetectorCNN::detect |
( |
InputArray | inputImage, |
|
|
std::vector< Rect > & | Bbox, |
|
|
std::vector< float > & | confidence ) |
|
pure virtual |
| Python: |
|---|
| cv.text.TextDetectorCNN.detect( | inputImage | ) -> | Bbox, confidence |
これは利便性のために提供されているオーバーロードされたメンバ関数である。上記の関数とは、受け取る引数のみが異なる。
- 引数
-
| inputImage | 任意のサイズのCV_U8C3であることが期待される画像 |
| Bbox | 検出された単語のバウンディングボックスを格納するRectのベクトル |
| confidence | 選択されたバウンディングボックスに対して分類器が持つ信頼度で更新されるfloatのベクトル |
cv::text::TextDetector を実装する。
このクラス詳解は次のファイルから抽出されました: