Skip to content

Latest commit

 

History

History
194 lines (151 loc) · 4.71 KB

File metadata and controls

194 lines (151 loc) · 4.71 KB
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

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: DynamsoftCore.framework

>- Objective-C >- Swift > >1. ```objc @interface DSIntermediateResultUnit : NSObject ``` 2. ```swift class 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]({{ 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.

getHashId

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 ```

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]({{ site.dcv_ios_api }}capture-vision-router/auxiliary-classes/intermediate-result-manager.html) class.

>- Objective-C >- Swift > >1. ```objc -(NSString*)getOriginalImageHashId; ``` 2. ```swift func getOriginalImageHashId() -> String ```

getOriginalImageTag

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.

getType

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).

>- Objective-C >- Swift > >1. ```objc -(DSIntermediateResultUnitType)getType; ``` 2. ```swift func getType() -> DSIntermediateResultUnitType ```

Return Value

The type of the intermediate result unit.

getTransformMatrix

Gets the transformation matrix via DSTransformMatrixType.

>- Objective-C >- Swift > >1. ```objc -(CGAffineTransform)getTransformMatrix:(DSTransformMatrixType)type; ``` 2. ```swift func getTransformMatrix(_ type: DSTransformMatrixType) -> 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 > >1. ```objc - (DSIntermediateResultUnit*)clone; ``` 2. ```swift func clone() -> IntermediateResultUnit ```

Return Value

A copy of the intermediate result unit.

replace

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.