OpenCV for Unity  2.6.3
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/4.10.0/index.html ) for the details of the argument of the method.
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
OpenCVForUnity.DnnModule.TextDetectionModel Class Reference

Base class for text detection networks. More...

Inheritance diagram for OpenCVForUnity.DnnModule.TextDetectionModel:
OpenCVForUnity.DnnModule.Model OpenCVForUnity.DisposableOpenCVObject OpenCVForUnity.DisposableObject OpenCVForUnity.DnnModule.TextDetectionModel_DB OpenCVForUnity.DnnModule.TextDetectionModel_EAST

Public Member Functions

void detect (Mat frame, List< MatOfPoint > detections, MatOfFloat confidences)
 Performs detection. More...
 
void detect (Mat frame, List< MatOfPoint > detections)
 
void detectTextRectangles (Mat frame, MatOfRotatedRect detections, MatOfFloat confidences)
 Performs detection. More...
 
void detectTextRectangles (Mat frame, MatOfRotatedRect detections)
 
- Public Member Functions inherited from OpenCVForUnity.DnnModule.Model
IntPtr getNativeObjAddr ()
 
 Model (string model, 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. More...
 
 Model (string model)
 Create model from deep learning network represented in one of the supported formats. An order of model and config arguments does not matter. More...
 
 Model (Net network)
 Create model from deep learning network. More...
 
Model setInputSize (Size size)
 Set input size for frame. More...
 
Model setInputSize (int width, int height)
 
Model setInputMean (Scalar mean)
 Set mean value for frame. More...
 
Model setInputScale (Scalar scale)
 Set scalefactor value for frame. More...
 
Model setInputCrop (bool crop)
 Set flag crop for frame. More...
 
Model setInputSwapRB (bool swapRB)
 Set flag swapRB for frame. More...
 
Model setOutputNames (List< string > outNames)
 Set output names for frame. More...
 
void setInputParams (double scale, Size size, Scalar mean, bool swapRB, bool crop)
 Set preprocessing parameters for frame. More...
 
void setInputParams (double scale, Size size, Scalar mean, bool swapRB)
 Set preprocessing parameters for frame. More...
 
void setInputParams (double scale, Size size, Scalar mean)
 Set preprocessing parameters for frame. More...
 
void setInputParams (double scale, Size size)
 Set preprocessing parameters for frame. More...
 
void setInputParams (double scale)
 Set preprocessing parameters for frame. More...
 
void setInputParams ()
 Set preprocessing parameters for frame. More...
 
void predict (Mat frame, List< Mat > outs)
 Given the input frame, create input blob, run net and return the output blobs. More...
 
Model setPreferableBackend (int backendId)
 
Model setPreferableTarget (int targetId)
 
Model enableWinograd (bool useWinograd)
 
- Public Member Functions inherited from OpenCVForUnity.DisposableObject
void Dispose ()
 
void ThrowIfDisposed ()
 

Static Public Member Functions

static new TextDetectionModel __fromPtr__ (IntPtr addr)
 
- Static Public Member Functions inherited from OpenCVForUnity.DnnModule.Model
static Model __fromPtr__ (IntPtr addr)
 
- Static Public Member Functions inherited from OpenCVForUnity.DisposableObject
static IntPtr ThrowIfNullIntPtr (IntPtr ptr)
 

Protected Member Functions

override void Dispose (bool disposing)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableOpenCVObject
 DisposableOpenCVObject ()
 
 DisposableOpenCVObject (IntPtr ptr)
 
 DisposableOpenCVObject (bool isEnabledDispose)
 
 DisposableOpenCVObject (IntPtr ptr, bool isEnabledDispose)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableObject
 DisposableObject ()
 
 DisposableObject (bool isEnabledDispose)
 

Additional Inherited Members

- Properties inherited from OpenCVForUnity.DisposableObject
bool IsDisposed [get, protected set]
 
bool IsEnabledDispose [get, set]
 

Detailed Description

Base class for text detection networks.

Member Function Documentation

◆ __fromPtr__()

static new TextDetectionModel OpenCVForUnity.DnnModule.TextDetectionModel.__fromPtr__ ( IntPtr  addr)
static

◆ detect() [1/2]

void OpenCVForUnity.DnnModule.TextDetectionModel.detect ( Mat  frame,
List< MatOfPoint detections,
MatOfFloat  confidences 
)

Performs detection.

Given the input frame, prepare network input, run network inference, post-process network output and return result detections.

Each result is quadrangle's 4 points in this order:

  • bottom-left
  • top-left
  • top-right
  • bottom-right

Use cv::getPerspectiveTransform function to retrieve image region without perspective transformations.

Note
If DL model doesn't support that kind of output then result may be derived from detectTextRectangles() output.
Parameters
[in]frameThe input image
[out]detectionsarray with detections' quadrangles (4 points per result)
[out]confidencesarray with detection confidences

◆ detect() [2/2]

void OpenCVForUnity.DnnModule.TextDetectionModel.detect ( Mat  frame,
List< MatOfPoint detections 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ detectTextRectangles() [1/2]

void OpenCVForUnity.DnnModule.TextDetectionModel.detectTextRectangles ( Mat  frame,
MatOfRotatedRect  detections,
MatOfFloat  confidences 
)

Performs detection.

Given the input frame, prepare network input, run network inference, post-process network output and return result detections.

Each result is rotated rectangle.

Note
Result may be inaccurate in case of strong perspective transformations.
Parameters
[in]framethe input image
[out]detectionsarray with detections' RotationRect results
[out]confidencesarray with detection confidences

◆ detectTextRectangles() [2/2]

void OpenCVForUnity.DnnModule.TextDetectionModel.detectTextRectangles ( Mat  frame,
MatOfRotatedRect  detections 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ Dispose()

override void OpenCVForUnity.DnnModule.TextDetectionModel.Dispose ( bool  disposing)
protectedvirtual

The documentation for this class was generated from the following file: