@Namespace(value="cv::barcode") @Properties(inherit=opencv_objdetect.class) public class BarcodeDetector extends GraphicalCodeDetector
GraphicalCodeDetector.ImplPointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter| Constructor and Description |
|---|
BarcodeDetector()
\brief Initialize the BarcodeDetector.
|
BarcodeDetector(BytePointer prototxt_path,
BytePointer model_path)
\brief Initialize the BarcodeDetector.
|
BarcodeDetector(long size)
Native array allocator.
|
BarcodeDetector(Pointer p)
Pointer cast constructor.
|
BarcodeDetector(String prototxt_path,
String model_path) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
decodeWithType(GpuMat img,
GpuMat points,
StringVector decoded_info,
StringVector decoded_type) |
boolean |
decodeWithType(Mat img,
Mat points,
StringVector decoded_info,
StringVector decoded_type)
\brief Decodes barcode in image once it's found by the detect() method.
|
boolean |
decodeWithType(UMat img,
UMat points,
StringVector decoded_info,
StringVector decoded_type) |
boolean |
detectAndDecodeWithType(GpuMat img,
StringVector decoded_info,
StringVector decoded_type) |
boolean |
detectAndDecodeWithType(GpuMat img,
StringVector decoded_info,
StringVector decoded_type,
GpuMat points) |
boolean |
detectAndDecodeWithType(Mat img,
StringVector decoded_info,
StringVector decoded_type) |
boolean |
detectAndDecodeWithType(Mat img,
StringVector decoded_info,
StringVector decoded_type,
Mat points)
\brief Both detects and decodes barcode
|
boolean |
detectAndDecodeWithType(UMat img,
StringVector decoded_info,
StringVector decoded_type) |
boolean |
detectAndDecodeWithType(UMat img,
StringVector decoded_info,
StringVector decoded_type,
UMat points) |
void |
getDetectorScales(float[] sizes) |
void |
getDetectorScales(FloatBuffer sizes) |
void |
getDetectorScales(FloatPointer sizes)
\brief Returns detector box filter sizes.
|
double |
getDownsamplingThreshold()
\brief Get detector downsampling threshold.
|
double |
getGradientThreshold()
\brief Get detector gradient magnitude threshold.
|
BarcodeDetector |
getPointer(long i) |
BarcodeDetector |
position(long position) |
BarcodeDetector |
setDetectorScales(float[] sizes) |
BarcodeDetector |
setDetectorScales(FloatBuffer sizes) |
BarcodeDetector |
setDetectorScales(FloatPointer sizes)
\brief Set detector box filter sizes.
|
BarcodeDetector |
setDownsamplingThreshold(double thresh)
\brief Set detector downsampling threshold.
|
BarcodeDetector |
setGradientThreshold(double thresh)
\brief Set detector gradient magnitude threshold.
|
decode, decode, decode, decode, decode, decode, decodeMulti, decodeMulti, decodeMulti, decodeMulti, decodeMulti, decodeMulti, decodeMulti, decodeMulti, decodeMulti, decodeMulti, decodeMulti, decodeMulti, detect, detect, detect, detectAndDecode, detectAndDecode, detectAndDecode, detectAndDecode, detectAndDecode, detectAndDecode, detectAndDecodeMulti, detectAndDecodeMulti, detectAndDecodeMulti, detectAndDecodeMulti, detectAndDecodeMulti, detectAndDecodeMulti, detectAndDecodeMulti, detectAndDecodeMulti, detectAndDecodeMulti, detectAndDecodeMulti, detectAndDecodeMulti, detectAndDecodeMulti, detectMulti, detectMulti, detectMulti, putaddress, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zeropublic BarcodeDetector(Pointer p)
Pointer(Pointer).public BarcodeDetector(long size)
Pointer.position(long).public BarcodeDetector()
public BarcodeDetector(@StdString BytePointer prototxt_path, @StdString BytePointer model_path)
prototxt_path - prototxt file path for the super resolution modelmodel_path - model file path for the super resolution modelpublic BarcodeDetector(@StdString String prototxt_path, @StdString String model_path)
public BarcodeDetector position(long position)
position in class GraphicalCodeDetectorpublic BarcodeDetector getPointer(long i)
getPointer in class GraphicalCodeDetector@Cast(value="bool") public boolean decodeWithType(@ByVal Mat img, @ByVal Mat points, @ByRef StringVector decoded_info, @ByRef StringVector decoded_type)
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 vectordecoded_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@Cast(value="bool") public boolean decodeWithType(@ByVal UMat img, @ByVal UMat points, @ByRef StringVector decoded_info, @ByRef StringVector decoded_type)
@Cast(value="bool") public boolean decodeWithType(@ByVal GpuMat img, @ByVal GpuMat points, @ByRef StringVector decoded_info, @ByRef StringVector decoded_type)
@Cast(value="bool") public boolean detectAndDecodeWithType(@ByVal Mat img, @ByRef StringVector decoded_info, @ByRef StringVector decoded_type, @ByVal(nullValue="cv::OutputArray(cv::noArray())") Mat points)
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 barcodespoints - optional output vector of vertices of the found barcode rectangle. Will be empty if not found.@Cast(value="bool") public boolean detectAndDecodeWithType(@ByVal Mat img, @ByRef StringVector decoded_info, @ByRef StringVector decoded_type)
@Cast(value="bool") public boolean detectAndDecodeWithType(@ByVal UMat img, @ByRef StringVector decoded_info, @ByRef StringVector decoded_type, @ByVal(nullValue="cv::OutputArray(cv::noArray())") UMat points)
@Cast(value="bool") public boolean detectAndDecodeWithType(@ByVal UMat img, @ByRef StringVector decoded_info, @ByRef StringVector decoded_type)
@Cast(value="bool") public boolean detectAndDecodeWithType(@ByVal GpuMat img, @ByRef StringVector decoded_info, @ByRef StringVector decoded_type, @ByVal(nullValue="cv::OutputArray(cv::noArray())") GpuMat points)
@Cast(value="bool") public boolean detectAndDecodeWithType(@ByVal GpuMat img, @ByRef StringVector decoded_info, @ByRef StringVector decoded_type)
public double getDownsamplingThreshold()
@ByRef public BarcodeDetector setDownsamplingThreshold(double thresh)
thresh - downsampling limit to apply (default 512)setDetectorScalespublic void getDetectorScales(@StdVector FloatPointer sizes)
sizes - output parameter for returning the sizes.public void getDetectorScales(@StdVector FloatBuffer sizes)
public void getDetectorScales(@StdVector float[] sizes)
@ByRef public BarcodeDetector setDetectorScales(@StdVector FloatPointer sizes)
sizes - box filter sizes, relative to minimum dimension of the image (default [0.01, 0.03, 0.06, 0.08])@ByRef public BarcodeDetector setDetectorScales(@StdVector FloatBuffer sizes)
@ByRef public BarcodeDetector setDetectorScales(@StdVector float[] sizes)
public double getGradientThreshold()
@ByRef public BarcodeDetector setGradientThreshold(double thresh)
thresh - gradient magnitude threshold (default 64).Copyright © 2025. All rights reserved.