layout | title | description | keywords | needGenerateH3Content | needAutoGenerateSidebar | noTitleIndex |
---|---|---|---|---|---|---|
default-layout |
DSIntermediateResultUnit - Dynamsoft Core Module iOS Edition API Reference |
The class DSIntermediateResultUnit of Dynamsoft Core Module represents an intermediate result unit used in image processing, which is an abstract base class with multiple subclasses. |
intermediate result unit, image processing, objective-c, swift |
true |
true |
true |
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.
Assembly: DynamsoftCore.framework
>- Objective-C >- Swift > >1. ```objc @interface DSIntermediateResultUnit : NSObject ``` 2. ```swift class IntermediateResultUnit : NSObject ```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 ]({{ site.dcv_enumerations }}core/intermediate-result-unit-type.html?lang=objc,swift). |
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. |
Gets the hash ID of the unit. The hash ID is the unique identifier for the intermediate result unit.
>- Objective-C >- Swift > >1. ```objc -(NSString*)getHashId; ``` 2. ```swift func getHashId() -> String ```Gets the hash ID of the original image associated with this unit. You can use this ID to get the original image via [DSIntermediateResultManager
]({{ site.dcv_ios_api }}capture-vision-router/auxiliary-classes/intermediate-result-manager.html) class.
Gets the tag associated with the original image.
>- Objective-C >- Swift > >1. ```objc -(nullable DSImageTag*)getOriginalImageTag; ``` 2. ```swift func getOriginalImageTag() -> ImageTag? ```Return Value
The image tag of the original image.
Gets the type of the intermediate result unit, defined by the enumeration [DSIntermediateResultUnitType
]({{ site.dcv_enumerations }}core/intermediate-result-unit-type.html?lang=objc,swift).
Return Value
The type of the intermediate result unit.
Gets the transformation matrix via DSTransformMatrixType
.
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
Creates a copy of the intermediate result unit.
>- Objective-C >- Swift > >1. ```objc - (DSIntermediateResultUnit*)clone; ``` 2. ```swift func clone() -> IntermediateResultUnit ```Return Value
A copy of the intermediate result unit.
Replaces the content of the intermediate result unit.
>- Objective-C >- Swift > >1. ```objc - (NSInteger)replace:(DSIntermediateResultUnit*)oldUnit; ``` 2. ```swift func replace(_ oldUnit: DSIntermediateResultUnit) -> 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.