DSLocalizedBarcodeElement Class
DSLocalizedBarcodeElement extends the DSRegionObjectElement class and represents a localized barcode element detected in an image.
Definition
Assembly: DynamsoftCaptureVisionBundle.xcframework
- Objective-C
- Swift
@interface DSLocalizedBarcodeElement : DSRegionObjectElementclass LocalizedBarcodeElement : RegionObjectElement
Methods
| Methods | Description |
|---|---|
init |
Creates a new DSLocalizedBarcodeElement object. |
getAngle |
Returns the orientation angle of the localized barcode. |
getConfidence |
Returns the confidence score of the localized barcode. |
getPossibleFormats |
Returns the possible formats of the localized barcode. |
setPossibleFormats |
Sets the possible formats of the localized barcode. |
getPossibleFormatsString |
Returns the possible formats of the localized barcode as a string. |
getModuleSize |
Returns the module size of the localized barcode. |
setLocation |
Sets the location of the localized barcode. |
The following attributes are inherited from class DSRegionObjectElement.
| Method | Description |
|——- |————-|
| getLocation | Gets the location of the region object, represented as a quadrilateral. |
| getReferencedElement | Gets the referenced element that supports the capturing of this element. |
| getRegionObjectElementType | Gets the type of the region object element, defined by the enumeration DSRegionObjectElementType. |
| getImageData | Gets the image data of this region object element. |
init
Create a new DSLocalizedBarcodeElement object.
- Objective-C
- Swift
- (instancetype)init;init()
getAngle
Returns the orientation angle of the localized barcode element, indicating how the element is positioned or rotated within the barcode.
- Objective-C
- Swift
- (NSInteger)getAnglefunc getAngle() -> NSInteger
Return Value
An integer representing the orientation angle of the localized barcode.
getConfidence
Returns the confidence/reliability score of the localization of the barcode element.
- Objective-C
- Swift
- (NSInteger)getConfidencefunc getConfidence() -> NSInteger
Return Value
An integer representing the confidence score of the localized barcode element, which represents the confidence that the positioning area is a barcode.
getPossibleFormats
Returns the possible formats of the localized barcode since the barcode has not been decoded yet, so the exact format is not yet determined.
- Objective-C
- Swift
- (DSBarcodeFormat)getPossibleFormatsfunc getPossibleFormats() -> BarcodeFormat
Return Value
The possible format(s) of the localized barcode as DSBarcodeFormat enumeration item(s).
setPossibleFormats
Set the possible format of the localized barcode. The possible format string is changed as well.
- Objective-C
- Swift
- (void)setPossibleFormats:(DSBarcodeFormat)possibleFormats;func setPossibleFormats(_ possibleFormats: BarcodeFormat)
Parameters
[in] possibleFormats: The possible DSBarcodeFormat of the localized barcode.
Return Value
Returns the ErrorCode if it fails. Otherwise, returns 0.
getPossibleFormatsString
Returns the possible format(s) of the localized barcode as a string, with each format split by a comma (“,”). Since the barcode has not been decoded yet, the exact format is not yet determined.
- Objective-C
- Swift
- (NSString *)getPossibleFormatsStringfunc getPossibleFormatsString() -> String
Return Value
A string representing all the possible formats of the localized barcode.
getModuleSize
Returns the size of the individual modules within the localized barcode element.
- Objective-C
- Swift
- (NSInteger)getModuleSizefunc getModuleSize() -> NSInteger
Return Value
An integer representing the module size of the localized barcode.
setLocation
Sets the location of the localized barcode.
- Objective-C
- Swift
- (NSInteger)setLocation:(DSQuadrilateral *)location;func setLocation(_ location: DSQuadrilateral)
Parameters
location: The location of the localized barcode as a DSQuadrilateral object.
Return Value
Returns 0 if the location is set successfully, otherwise returns the error code.