DSIntermediateResultUnit
The IntermediateResultUnit class represents the base structure for units of intermediate results in image processing. This class acts as a base and contains common methods shared by all intermediate result units.
Definition
Assembly: DynamsoftCaptureVisionBundle.xcframework
- Objective-C
- Swift
@interface DSIntermediateResultUnit : NSObjectclass IntermediateResultUnit : NSObject
Methods
| 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. |
getHashId
Gets the hash ID of the unit. The hash ID is the unique identifier for the intermediate result unit.
- Objective-C
- Swift
-(NSString*)getHashId;func getHashId() -> String
getOriginalImageHashId
Gets the hash ID of the original image associated with this unit. You can use this ID to get the original image via DSIntermediateResultManager class.
- Objective-C
- Swift
-(NSString*)getOriginalImageHashId;func getOriginalImageHashId() -> String
getOriginalImageTag
Gets the tag associated with the original image.
- Objective-C
- Swift
-(nullable DSImageTag*)getOriginalImageTag;func getOriginalImageTag() -> ImageTag?
Return Value
The image tag of the original image.
getType
Gets the type of the intermediate result unit, defined by the enumeration DSIntermediateResultUnitType.
- Objective-C
- Swift
-(DSIntermediateResultUnitType)getType;func getType() -> IntermediateResultUnitType
Return Value
The type of the intermediate result unit.
getTransformMatrix
Gets the transformation matrix via DSTransformMatrixType.
- Objective-C
- Swift
-(CGAffineTransform)getTransformMatrix:(DSTransformMatrixType)type;func getTransformMatrix(_ type: TransformMatrixType) -> CGAffineTransform
Parameters
[in] matrixType: The transform matrix type.
Return Value
The corresponding transformation matrices are as follows:
- local image to original image
- original image to local image
- rotated image to original image
- original image to rotated image
clone
Creates a copy of the intermediate result unit.
- Objective-C
- Swift
- (DSIntermediateResultUnit*)clone;func clone() -> IntermediateResultUnit
Return Value
A copy of the intermediate result unit.
replace
Replaces the content of the intermediate result unit.
- Objective-C
- Swift
- (NSInteger)replace:(DSIntermediateResultUnit*)oldUnit;func replace(_ oldUnit: IntermediateResultUnit) -> NSInteger
Parameters
[in] oldUnit: The old unit.
Return Value
A NSInteger that indicates whether the replace is success. If success returns 0, otherwise returns the error code.