テキスト検出ネットワークの基底クラス。 続き...
#include <opencv2/dnn/dnn.hpp>
|
| 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 |
| | 検出を実行する。
|
| |
| | Model () |
| |
| | Model (const Model &)=default |
| |
| | Model (const Net &network) |
| | ディープラーニングのネットワークからモデルを作成する。
|
| |
| | Model (CV_WRAP_FILE_PATH const String &model, CV_WRAP_FILE_PATH const String &config="") |
| | サポートされている形式のいずれかで表現されたディープラーニングのネットワークからモデルを作成する。model と config 引数の順序は問わない。
|
| |
| | Model (Model &&)=default |
| |
| Model & | enableWinograd (bool useWinograd) |
| |
| Impl * | getImpl () const |
| |
| Impl & | getImplRef () const |
| |
| Net & | getNetwork_ () |
| |
| Net & | getNetwork_ () const |
| |
| | operator Net & () const |
| |
| Model & | operator= (const Model &)=default |
| |
| Model & | operator= (Model &&)=default |
| |
| void | predict (InputArray frame, OutputArrayOfArrays outs) const |
| | input フレームを与え、入力blobを作成し、netを実行して出力 blobs を返す。
|
| |
| Model & | setInputCrop (bool crop) |
| | フレームに対するcropフラグを設定する。
|
| |
| Model & | setInputMean (const Scalar &mean) |
| | フレームに対する平均値を設定する。
|
| |
| void | setInputParams (double scale=1.0, const Size &size=Size(), const Scalar &mean=Scalar(), bool swapRB=false, bool crop=false) |
| | フレームの前処理パラメータを設定する。
|
| |
| Model & | setInputScale (const Scalar &scale) |
| | フレームのscalefactor値を設定する。
|
| |
| Model & | setInputSize (const Size &size) |
| | フレームの入力サイズを設定する。
|
| |
| Model & | setInputSize (int width, int height) |
| |
| Model & | setInputSwapRB (bool swapRB) |
| | フレームのフラグswapRBを設定する。
|
| |
| Model & | setOutputNames (const std::vector< String > &outNames) |
| | フレームの出力名を設定する。
|
| |
| Model & | setPreferableBackend (dnn::Backend backendId) |
| |
| Model & | setPreferableTarget (dnn::Target targetId) |
| |
◆ TextDetectionModel()
| cv::dnn::TextDetectionModel::TextDetectionModel |
( |
| ) |
|
|
protected |
◆ detect() [1/2]
| void cv::dnn::TextDetectionModel::detect |
( |
InputArray | frame, |
|
|
std::vector< std::vector< Point > > & | detections ) const |
| Python: |
|---|
| cv.dnn.TextDetectionModel.detect( | frame | ) -> | detections, confidences |
| cv.dnn.TextDetectionModel.detect( | frame | ) -> | detections |
これは利便性のために提供されているオーバーロードされたメンバ関数である。上記の関数とは、受け取る引数のみが異なる。
◆ detect() [2/2]
| void cv::dnn::TextDetectionModel::detect |
( |
InputArray | frame, |
|
|
std::vector< std::vector< Point > > & | detections, |
|
|
std::vector< float > & | confidences ) const |
| Python: |
|---|
| cv.dnn.TextDetectionModel.detect( | frame | ) -> | detections, confidences |
| cv.dnn.TextDetectionModel.detect( | frame | ) -> | detections |
検出を実行する。
入力 frame を受け取り、ネットワーク入力を準備し、ネットワーク推論を実行し、ネットワーク出力を後処理して検出結果を返す。
各結果は次の順序の四角形の4点である。
透視変換を行わずに画像領域を取得するには cv::getPerspectiveTransform 関数を使用する。
- 覚え書き
- DLモデルがこの種の出力をサポートしていない場合、結果は detectTextRectangles() の出力から導出される場合がある。
- 引数
-
| [in] | frame | 入力画像 |
| [out] | detections | 検出された四角形の配列(結果1件につき4点) |
| [out] | confidences | 検出の信頼度の配列 |
◆ detectTextRectangles() [1/2]
| void cv::dnn::TextDetectionModel::detectTextRectangles |
( |
InputArray | frame, |
|
|
std::vector< cv::RotatedRect > & | detections ) const |
| Python: |
|---|
| cv.dnn.TextDetectionModel.detectTextRectangles( | frame | ) -> | detections, confidences |
| cv.dnn.TextDetectionModel.detectTextRectangles( | frame | ) -> | detections |
これは利便性のために提供されているオーバーロードされたメンバ関数である。上記の関数とは、受け取る引数のみが異なる。
◆ detectTextRectangles() [2/2]
| void cv::dnn::TextDetectionModel::detectTextRectangles |
( |
InputArray | frame, |
|
|
std::vector< cv::RotatedRect > & | detections, |
|
|
std::vector< float > & | confidences ) const |
| Python: |
|---|
| cv.dnn.TextDetectionModel.detectTextRectangles( | frame | ) -> | detections, confidences |
| cv.dnn.TextDetectionModel.detectTextRectangles( | frame | ) -> | detections |
検出を実行する。
入力 frame を受け取り、ネットワーク入力を準備し、ネットワーク推論を実行し、ネットワーク出力を後処理して検出結果を返す。
各結果は回転矩形である。
- 覚え書き
- 強い透視変換がある場合、結果は不正確になることがある。
- 引数
-
| [in] | frame | 入力画像 |
| [out] | detections | 検出された RotationRect 結果の配列 |
| [out] | confidences | 検出の信頼度の配列 |
このクラス詳解は次のファイルから抽出されました: