OpenCV for Unity  2.6.0
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/4.9.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.ObjdetectModule.BarcodeDetector Class Reference
Inheritance diagram for OpenCVForUnity.ObjdetectModule.BarcodeDetector:
OpenCVForUnity.ObjdetectModule.GraphicalCodeDetector OpenCVForUnity.DisposableOpenCVObject OpenCVForUnity.DisposableObject

Public Member Functions

 BarcodeDetector ()
 Initialize the BarcodeDetector. More...
 
 BarcodeDetector (string prototxt_path, string model_path)
 Initialize the BarcodeDetector. More...
 
bool decodeWithType (Mat img, Mat points, List< string > decoded_info, List< string > decoded_type)
 Decodes barcode in image once it's found by the detect() method. More...
 
bool detectAndDecodeWithType (Mat img, List< string > decoded_info, List< string > decoded_type, Mat points)
 Both detects and decodes barcode. More...
 
bool detectAndDecodeWithType (Mat img, List< string > decoded_info, List< string > decoded_type)
 Both detects and decodes barcode. More...
 
- Public Member Functions inherited from OpenCVForUnity.ObjdetectModule.GraphicalCodeDetector
IntPtr getNativeObjAddr ()
 
bool detect (Mat img, Mat points)
 Detects graphical code in image and returns the quadrangle containing the code. More...
 
string decode (Mat img, Mat points, Mat straight_code)
 Decodes graphical code in image once it's found by the detect() method. More...
 
string decode (Mat img, Mat points)
 Decodes graphical code in image once it's found by the detect() method. More...
 
string detectAndDecode (Mat img, Mat points, Mat straight_code)
 Both detects and decodes graphical code. More...
 
string detectAndDecode (Mat img, Mat points)
 Both detects and decodes graphical code. More...
 
string detectAndDecode (Mat img)
 Both detects and decodes graphical code. More...
 
bool detectMulti (Mat img, Mat points)
 Detects graphical codes in image and returns the vector of the quadrangles containing the codes. More...
 
bool decodeMulti (Mat img, Mat points, List< string > decoded_info, List< Mat > straight_code)
 Decodes graphical codes in image once it's found by the detect() method. More...
 
bool decodeMulti (Mat img, Mat points, List< string > decoded_info)
 Decodes graphical codes in image once it's found by the detect() method. More...
 
bool detectAndDecodeMulti (Mat img, List< string > decoded_info, Mat points, List< Mat > straight_code)
 Both detects and decodes graphical codes. More...
 
bool detectAndDecodeMulti (Mat img, List< string > decoded_info, Mat points)
 Both detects and decodes graphical codes. More...
 
bool detectAndDecodeMulti (Mat img, List< string > decoded_info)
 Both detects and decodes graphical codes. More...
 
- Public Member Functions inherited from OpenCVForUnity.DisposableObject
void Dispose ()
 
void ThrowIfDisposed ()
 

Static Public Member Functions

static new BarcodeDetector __fromPtr__ (IntPtr addr)
 
- Static Public Member Functions inherited from OpenCVForUnity.ObjdetectModule.GraphicalCodeDetector
static GraphicalCodeDetector __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.ObjdetectModule.GraphicalCodeDetector
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]
 

Constructor & Destructor Documentation

◆ BarcodeDetector() [1/2]

OpenCVForUnity.ObjdetectModule.BarcodeDetector.BarcodeDetector ( )

Initialize the BarcodeDetector.

◆ BarcodeDetector() [2/2]

OpenCVForUnity.ObjdetectModule.BarcodeDetector.BarcodeDetector ( string  prototxt_path,
string  model_path 
)

Initialize the BarcodeDetector.

Parameters allow to load optional Super Resolution DNN model for better quality.

Parameters
prototxt_pathprototxt file path for the super resolution model
model_pathmodel file path for the super resolution model

Member Function Documentation

◆ __fromPtr__()

static new BarcodeDetector OpenCVForUnity.ObjdetectModule.BarcodeDetector.__fromPtr__ ( IntPtr  addr)
static

◆ decodeWithType()

bool OpenCVForUnity.ObjdetectModule.BarcodeDetector.decodeWithType ( Mat  img,
Mat  points,
List< string >  decoded_info,
List< string >  decoded_type 
)

Decodes barcode in image once it's found by the detect() method.

Parameters
imggrayscale or color (BGR) image containing bar code.
pointsvector of rotated rectangle vertices found by detect() method (or some other algorithm). For N detected barcodes, the dimensions of this array should be [N][4]. Order of four points in vector<Point2f> is bottomLeft, topLeft, topRight, bottomRight.
decoded_infoUTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.
decoded_typevector strings, specifies the type of these barcodes
Returns
true if at least one valid barcode have been found

◆ detectAndDecodeWithType() [1/2]

bool OpenCVForUnity.ObjdetectModule.BarcodeDetector.detectAndDecodeWithType ( Mat  img,
List< string >  decoded_info,
List< string >  decoded_type,
Mat  points 
)

Both detects and decodes barcode.

Parameters
imggrayscale or color (BGR) image containing barcode.
decoded_infoUTF8-encoded output vector of string(s) or empty vector of string if the codes cannot be decoded.
decoded_typevector of strings, specifies the type of these barcodes
pointsoptional output vector of vertices of the found barcode rectangle. Will be empty if not found.
Returns
true if at least one valid barcode have been found

◆ detectAndDecodeWithType() [2/2]

bool OpenCVForUnity.ObjdetectModule.BarcodeDetector.detectAndDecodeWithType ( Mat  img,
List< string >  decoded_info,
List< string >  decoded_type 
)

Both detects and decodes barcode.

Parameters
imggrayscale or color (BGR) image containing barcode.
decoded_infoUTF8-encoded output vector of string(s) or empty vector of string if the codes cannot be decoded.
decoded_typevector of strings, specifies the type of these barcodes
pointsoptional output vector of vertices of the found barcode rectangle. Will be empty if not found.
Returns
true if at least one valid barcode have been found

◆ Dispose()

override void OpenCVForUnity.ObjdetectModule.BarcodeDetector.Dispose ( bool  disposing)
protectedvirtual

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