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 | |
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... | |
double | getDownsamplingThreshold () |
Get detector downsampling threshold. More... | |
BarcodeDetector | setDownsamplingThreshold (double thresh) |
Set detector downsampling threshold. More... | |
void | getDetectorScales (MatOfFloat sizes) |
Returns detector box filter sizes. More... | |
BarcodeDetector | setDetectorScales (MatOfFloat sizes) |
Set detector box filter sizes. More... | |
double | getGradientThreshold () |
Get detector gradient magnitude threshold. More... | |
BarcodeDetector | setGradientThreshold (double thresh) |
Set detector gradient magnitude threshold. 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] |
OpenCVForUnity.ObjdetectModule.BarcodeDetector.BarcodeDetector | ( | ) |
Initialize the BarcodeDetector.
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.
prototxt_path | prototxt file path for the super resolution model |
model_path | model file path for the super resolution model |
|
static |
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.
img | grayscale or color (BGR) image containing bar code. |
points | vector 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_info | UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded. |
decoded_type | vector strings, specifies the type of these barcodes |
bool OpenCVForUnity.ObjdetectModule.BarcodeDetector.detectAndDecodeWithType | ( | Mat | img, |
List< string > | decoded_info, | ||
List< string > | decoded_type, | ||
Mat | points | ||
) |
Both detects and decodes barcode.
img | grayscale or color (BGR) image containing barcode. |
decoded_info | UTF8-encoded output vector of string(s) or empty vector of string if the codes cannot be decoded. |
decoded_type | vector of strings, specifies the type of these barcodes |
points | optional output vector of vertices of the found barcode rectangle. Will be empty if not found. |
bool OpenCVForUnity.ObjdetectModule.BarcodeDetector.detectAndDecodeWithType | ( | Mat | img, |
List< string > | decoded_info, | ||
List< string > | decoded_type | ||
) |
Both detects and decodes barcode.
img | grayscale or color (BGR) image containing barcode. |
decoded_info | UTF8-encoded output vector of string(s) or empty vector of string if the codes cannot be decoded. |
decoded_type | vector of strings, specifies the type of these barcodes |
points | optional output vector of vertices of the found barcode rectangle. Will be empty if not found. |
|
protectedvirtual |
Reimplemented from OpenCVForUnity.DisposableOpenCVObject.
void OpenCVForUnity.ObjdetectModule.BarcodeDetector.getDetectorScales | ( | MatOfFloat | sizes | ) |
Returns detector box filter sizes.
sizes | output parameter for returning the sizes. |
double OpenCVForUnity.ObjdetectModule.BarcodeDetector.getDownsamplingThreshold | ( | ) |
Get detector downsampling threshold.
double OpenCVForUnity.ObjdetectModule.BarcodeDetector.getGradientThreshold | ( | ) |
Get detector gradient magnitude threshold.
BarcodeDetector OpenCVForUnity.ObjdetectModule.BarcodeDetector.setDetectorScales | ( | MatOfFloat | sizes | ) |
Set detector box filter sizes.
Adjusts the value and the number of box filters used in the detect step. The filter sizes directly correlate with the expected line widths for a barcode. Corresponds to expected barcode distance. If the downsampling limit is increased, filter sizes need to be adjusted in an inversely proportional way.
sizes | box filter sizes, relative to minimum dimension of the image (default [0.01, 0.03, 0.06, 0.08]) |
BarcodeDetector OpenCVForUnity.ObjdetectModule.BarcodeDetector.setDownsamplingThreshold | ( | double | thresh | ) |
Set detector downsampling threshold.
By default, the detect method resizes the input image to this limit if the smallest image size is is greater than the threshold. Increasing this value can improve detection accuracy and the number of results at the expense of performance. Correlates with detector scales. Setting this to a large value will disable downsampling.
thresh | downsampling limit to apply (default 512) |
BarcodeDetector OpenCVForUnity.ObjdetectModule.BarcodeDetector.setGradientThreshold | ( | double | thresh | ) |
Set detector gradient magnitude threshold.
Sets the coherence threshold for detected bounding boxes. Increasing this value will generate a closer fitted bounding box width and can reduce false-positives. Values between 16 and 1024 generally work, while too high of a value will remove valid detections.
thresh | gradient magnitude threshold (default 64). |