OpenCV453
公開メンバ関数 | 全メンバ一覧
cv::dnn::TextRecognitionModel クラス

This class represents high-level API for text recognition networks. [詳解]

#include <dnn.hpp>

cv::dnn::Modelを継承しています。

公開メンバ関数

CV_WRAP TextRecognitionModel (const Net &network)
 Create Text Recognition model from deep learning network Call setDecodeType() and setVocabulary() after constructor to initialize the decoding method [詳解]
 
CV_WRAP TextRecognitionModel (const std::string &model, const std::string &config="")
 Create text recognition model from network represented in one of the supported formats Call setDecodeType() and setVocabulary() after constructor to initialize the decoding method [詳解]
 
CV_WRAP TextRecognitionModelsetDecodeType (const std::string &decodeType)
 Set the decoding method of translating the network output into string [詳解]
 
CV_WRAP const std::string & getDecodeType () const
 Get the decoding method [詳解]
 
CV_WRAP TextRecognitionModelsetVocabulary (const std::vector< std::string > &vocabulary)
 Set the vocabulary for recognition. [詳解]
 
CV_WRAP const std::vector< std::string > & getVocabulary () const
 Get the vocabulary for recognition. [詳解]
 
CV_WRAP std::string recognize (InputArray frame) const
 Given the input frame, create input blob, run net and return recognition result [詳解]
 
CV_WRAP void recognize (InputArray frame, InputArrayOfArrays roiRects, CV_OUT std::vector< std::string > &results) const
 Given the input frame, create input blob, run net and return recognition result [詳解]
 
- 基底クラス cv::dnn::Model に属する継承公開メンバ関数
 Model (const Model &)=default
 
 Model (Model &&)=default
 
Modeloperator= (const Model &)=default
 
Modeloperator= (Model &&)=default
 
CV_WRAP Model (const String &model, const String &config="")
 Create model from deep learning network represented in one of the supported formats. An order of model and config arguments does not matter. [詳解]
 
CV_WRAP Model (const Net &network)
 Create model from deep learning network. [詳解]
 
CV_WRAP ModelsetInputSize (const Size &size)
 Set input size for frame. [詳解]
 
CV_WRAP ModelsetInputSize (int width, int height)
 
CV_WRAP ModelsetInputMean (const Scalar &mean)
 Set mean value for frame. [詳解]
 
CV_WRAP ModelsetInputScale (double scale)
 Set scalefactor value for frame. [詳解]
 
CV_WRAP ModelsetInputCrop (bool crop)
 Set flag crop for frame. [詳解]
 
CV_WRAP ModelsetInputSwapRB (bool swapRB)
 Set flag swapRB for frame. [詳解]
 
CV_WRAP void setInputParams (double scale=1.0, const Size &size=Size(), const Scalar &mean=Scalar(), bool swapRB=false, bool crop=false)
 Set preprocessing parameters for frame. [詳解]
 
CV_WRAP void predict (InputArray frame, OutputArrayOfArrays outs) const
 Given the input frame, create input blob, run net and return the output blobs. [詳解]
 
CV_WRAP ModelsetPreferableBackend (dnn::Backend backendId)
 
CV_WRAP ModelsetPreferableTarget (dnn::Target targetId)
 
CV_DEPRECATED_EXTERNAL operator Net & () const
 
NetgetNetwork_ () const
 
NetgetNetwork_ ()
 
Impl * getImpl () const
 
Impl & getImplRef () const
 

その他の継承メンバ

- 基底クラス cv::dnn::Model に属する継承限定公開変数類
Ptr< Impl > impl
 

詳解

This class represents high-level API for text recognition networks.

TextRecognitionModel allows to set params for preprocessing input image. TextRecognitionModel creates net from file with trained weights and config, sets preprocessing input, runs forward pass and return recognition result. For TextRecognitionModel, CRNN-CTC is supported.

構築子と解体子

◆ TextRecognitionModel() [1/2]

CV_WRAP cv::dnn::TextRecognitionModel::TextRecognitionModel ( const Net network)

Create Text Recognition model from deep learning network Call setDecodeType() and setVocabulary() after constructor to initialize the decoding method

引数
[in]networkNet object

◆ TextRecognitionModel() [2/2]

CV_WRAP cv::dnn::TextRecognitionModel::TextRecognitionModel ( const std::string &  model,
const std::string &  config = "" 
)
inline

Create text recognition model from network represented in one of the supported formats Call setDecodeType() and setVocabulary() after constructor to initialize the decoding method

引数
[in]modelBinary file contains trained weights
[in]configText file contains network configuration

関数詳解

◆ getDecodeType()

CV_WRAP const std::string & cv::dnn::TextRecognitionModel::getDecodeType ( ) const

Get the decoding method

戻り値
the decoding method

◆ getVocabulary()

CV_WRAP const std::vector< std::string > & cv::dnn::TextRecognitionModel::getVocabulary ( ) const

Get the vocabulary for recognition.

戻り値
vocabulary the associated vocabulary

◆ recognize() [1/2]

CV_WRAP std::string cv::dnn::TextRecognitionModel::recognize ( InputArray  frame) const

Given the input frame, create input blob, run net and return recognition result

引数
[in]frameThe input image
戻り値
The text recognition result

◆ recognize() [2/2]

CV_WRAP void cv::dnn::TextRecognitionModel::recognize ( InputArray  frame,
InputArrayOfArrays  roiRects,
CV_OUT std::vector< std::string > &  results 
) const

Given the input frame, create input blob, run net and return recognition result

引数
[in]frameThe input image
[in]roiRectsList of text detection regions of interest (cv::Rect, CV_32SC4). ROIs is be cropped as the network inputs
[out]resultsA set of text recognition results.

◆ setDecodeType()

CV_WRAP TextRecognitionModel & cv::dnn::TextRecognitionModel::setDecodeType ( const std::string &  decodeType)

Set the decoding method of translating the network output into string

引数
[in]decodeTypeThe decoding method of translating the network output into string: {'CTC-greedy': greedy decoding for the output of CTC-based methods}

◆ setVocabulary()

CV_WRAP TextRecognitionModel & cv::dnn::TextRecognitionModel::setVocabulary ( const std::vector< std::string > &  vocabulary)

Set the vocabulary for recognition.

引数
[in]vocabularythe associated vocabulary of the network.

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