文本检测网络基类。 更多...
#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,运行网络并返回输出 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 |
( |
| ) |
|
|
保护 |
◆ 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 | ) -> | 检测 |
这是一个重载的成员函数,为了方便而提供。它与上述函数的不同之处仅在于它接受的参数。
◆ detect() [2/2]
| void cv::dnn::TextDetectionModel::detect |
( |
InputArray | frame, |
|
|
std::vector< std::vector< Point > > & | 检测, |
|
|
std::vector< float > & | confidences ) const |
| Python |
|---|
| cv.dnn.TextDetectionModel.detect( | frame | ) -> | detections, confidences |
| cv.dnn.TextDetectionModel.detect( | frame | ) -> | 检测 |
◆ 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 | ) -> | 检测 |
这是一个重载的成员函数,为了方便而提供。它与上述函数的不同之处仅在于它接受的参数。
◆ detectTextRectangles() [2/2]
| void cv::dnn::TextDetectionModel::detectTextRectangles |
( |
InputArray | frame, |
|
|
std::vector< cv::RotatedRect > & | 检测, |
|
|
std::vector< float > & | confidences ) const |
| Python |
|---|
| cv.dnn.TextDetectionModel.detectTextRectangles( | frame | ) -> | detections, confidences |
| cv.dnn.TextDetectionModel.detectTextRectangles( | frame | ) -> | 检测 |
执行检测。
给定输入 frame,准备网络输入,运行网络推理,后处理网络输出并返回结果检测。
每个结果都是旋转的矩形。
- 注意
- 在强透视变换的情况下,结果可能不准确。
- 参数
-
| [输入] | frame | 输入图像 |
| [输出] | 检测 | 具有检测到的 RotationRect 结果的数组 |
| [输出] | confidences | 具有检测置信度的数组 |
该类的文档由以下文件生成