Thanks for downloading Dynamsoft Barcode Reader Package!
Your download will start shortly. If your download does not begin, click here to retry.
DSContoursUnit
The DSContoursUnit
class extends the DSIntermediateResultUnit
class and represents a unit of contours, which are collections of points that define the shape of an object in an image.
Definition
Assembly: DynamsoftCore.framework
- Objective-C
- Swift
@interface DSContoursUnit: DSIntermediateResultUnit
class ContoursUnit: IntermediateResultUnit
Methods
Method | Description |
---|---|
getContours |
Gets the array of DSContour objects. |
getHierarchies |
Gets the array of DSVector4 objects. |
setContours |
Sets the contours. |
Inherited Methods
The following methods are inherited from class IntermediateResultUnit
.
Method | Description |
---|---|
getHashId |
Gets the hash ID of the unit. The hash ID is the unique identifier for the intermediate result unit. |
getOriginalImageHashId |
Gets the hash ID of the original image associated with this unit. |
getOriginalImageTag |
Gets the tag associated with the original image. |
getType |
Gets the type of the intermediate result unit, defined by the enumeration IntermediateResultUnitType . |
getTransformMatrix |
Gets the transformation matrix via DSTransformMatrixType . |
clone |
Creates a copy of the intermediate result unit. |
replace |
Replaces the content of the intermediate result unit. |
getContours
Get an array of DSContour
objects.
- Objective-C
- Swift
-(nullable NSArray<DSContour*>*)getContours;
func getContours() -> [Contour]?
Return Value
An array of DSContour
objects.
setContours
Sets the contours.
- Objective-C
- Swift
-(NSInteger)setContours:(NSArray<DSContour*>*)contours hierarchies:(NSArray<Vector4*>*)hierarchies matrixToOriginalImage:(CGAffineTransform)matrixToOriginalImage;
func setContours(_ contours: [Contour]?, hierarchies: [Vector4]?, matrixToOriginalImage: CGAffineTransform) -> Int
Parameters
contours
: An array of DSContour
objects.
hierarchies
: The contour hierarchies as an array of DSVector4
objects.
matrixToOriginalImage
: The matrix to original image.
Return Value
Returns the ErrorCode
if failed. Otherwise, returns 0.
getHierarchies
Gets the array of DSVector4
objects.
- Objective-C
- Swift
-(nullable NSArray<DSVector4*>*)getHierarchies;
func getHierarchies() -> [Vector4]?
Return Value
The contour hierarchies as an array of DSVector4
objects.