Resource Base
Table of contents

Thanks for downloading Dynamsoft Barcode Reader Package!

Your download will start shortly. If your download does not begin, click here to retry.

DSPredetectedRegionsUnit

The DSPredetectedRegionsUnit class extends the DSIntermediateResultUnit class and represents a unit of intermediate result specifically for pre-detected regions.

Definition

Assembly: DynamsoftCore.framework

  • Objective-C
  • Swift
  1. @interface DSPredetectedRegionsUnit: DSIntermediateResultUnit
    
  2. class PredetectedRegionsUnit: IntermediateResultUnit
    

Methods

Method Description
getPredetectedRegions Gets an array of DSPredetectedRegionElement objects, each representing a pre-detected region detected within the image.
getCount Returns the number of pre-detected regions.
getPredetectedRegion Returns a pre-detected region.
removeAllPredectedRegions Removes all pre-detected regions.
removePredetectedRegion Removes the pre-detected region at the specified index.
addPredetectedRegion Adds a pre-detected region.
setPredetectedRegion Sets a pre-detected region.

Inherited Methods

The following methods are inherited from class DSIntermediateResultUnit.

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.

getPredetectedRegions

Get an array of DSPredetectedRegionElement objects, each representing a pre-detected region detected within the image.

  • Objective-C
  • Swift
  1. -(nullable NSArray<DSPredetectedRegionElement*>*)getPredetectedRegions;
    
  2. func getPredetectedRegions() -> [PredetectedRegionElement]?
    

Return Value

An array of DSPredetectedRegionElement objects that indicates the pre-detected regions.

getCount

Returns the number of pre-detected regions.

  • Objective-C
  • Swift
  1. -(NSInteger)getCount;
    
  2. func getCount() -> Int
    

Return Value

Returns the number of pre-detected regions.

getPredetectedRegion

Returns a pre-detected region.

  • Objective-C
  • Swift
  1. -(nullable DSPredetectedRegionElement*)getPredetectedRegion:(NSInteger)index;
    
  2. func getPredetectedRegion(_ index: Int) -> PredetectedRegionElement?
    

Parameters

index: Specify the index of the pre-detected region.

Return Value

Returns the pre-detected region at the specified index.

removeAllPredectedRegions

Removes all pre-detected regions.

  • Objective-C
  • Swift
  1. -(void)removeAllPredectedRegions;
    
  2. func removeAllPredectedRegions()
    

removePredetectedRegion

Removes the pre-detected region at the specified index.

  • Objective-C
  • Swift
  1. -(NSInteger)removePredetectedRegion:(NSInteger)index;
    
  2. func removePredetectedRegion(_ index: Int) -> Int
    

Parameters

index: Specify the index of the pre-detected region.

Return Value

Returns the ErrorCode if failed. Otherwise, returns 0.

addPredetectedRegion

Adds a pre-detected region.

  • Objective-C
  • Swift
  1. -(NSInteger)addPredetectedRegion:(DSPredetectedRegionElement*)element
           matrixToOriginalImage:(CGAffineTransform)matrixToOriginalImage;
    
  2. func addPredetectedRegion(_ element: PredetectedRegionElement, matrixToOriginalImage: CGAffineTransform) -> Int
    

Parameters

element: A DSPredetectedRegionElement object that indicates the pre-detected region.

matrixToOriginalImage: A CGAffineTransform object that indicates the transformation matrix from the original image to the pre-detected region.

Return Value

Returns the ErrorCode if failed. Otherwise, returns 0.

setPredetectedRegion

Sets a pre-detected region.

  • Objective-C
  • Swift
  1. -(NSInteger)setPredetectedRegion:(NSInteger)index
                         element:(DSPredetectedRegionElement*)element
           matrixToOriginalImage:(CGAffineTransform)matrixToOriginalImage;
    
  2. func setPredetectedRegion(_ index: Int, element: PredetectedRegionElement, matrixToOriginalImage: CGAffineTransform) -> Int
    

Parameters

index: Specify the index of the pre-detected region.

element: A DSPredetectedRegionElement object that indicates the pre-detected region.

matrixToOriginalImage: A CGAffineTransform object that indicates the transformation matrix from the original image to the pre-detected region.

Return Value

Returns the ErrorCode if failed. Otherwise, returns 0.

This page is compatible for:

Version 1.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

  • Latest version
  • Version 2.x
    • Version 2.2.10
    • Version 2.0.21
    • Version 2.0.20
    • Version 2.0.10
    • Version 2.2.10
    • Version 2.0.21
    • Version 2.0.20
    • Version 2.0.10
  • Version 1.x
    • Version 1.2.1
    • Version 1.2.0
    • Version 1.1.0
    • Version 1.0.0
    • Version 1.0.4
    • Version 1.0.3
    • Version 1.0.2
    • Version 1.0.1
    • Version 1.0.0
    • Version 1.1.11
    • Version 1.1.9
    • Version 1.1.8
    • Version 1.1.7
    • Version 1.1.6
    • Version 1.1.5
    • Version 1.1.4
    • Version 1.1.3
    • Version 1.1.2
    • Version 1.1.1
    • Version 1.1.0
    • Version 1.0.0
    • Version 1.0.4
    • Version 1.0.3
    • Version 1.0.2
    • Version 1.0.1
    • Version 1.0.0
Change +
© 2003–2024 Dynamsoft. All rights reserved.
Privacy Statement / Site Map / Home / Purchase / Support