Documentation
Table of contents

DSLocalizedTextLinesUnit

The DSLocalizedTextLinesUnit class represents a unit that contains localized text lines. It inherits from the DSIntermediateResultUnit class.

Definition

Assembly: DynamsoftCaptureVisionBundle.xcframework

  • Objective-C
  • Swift
  1. @interface DSLocalizedTextLinesUnit: DSIntermediateResultUnit
    
  2. class LocalizedTextLinesUnit: IntermediateResultUnit
    

Inheritance: DSIntermediateResultUnit -> DSLocalizedTextLinesUnit

Methods

Method Description
getLocalizedTextLines Get all the text lines in an array of DSLocalizedTextLineElement, which is the basic unit of the localized text line result.
getCount Get the number of text lines in this unit.
getLocalizedTextLine Get the localized text line at the specified index in a LocalizedTextLineElement object.
removeAllLocalizedTextLines Remove all the text lines from this unit.
removeLocalizedTextLine Remove the localized text line at the specified index from this unit.
addLocalizedTextLine Add a localized text line to this unit.
setLocalizedTextLine Set the localized text line at the specified index in a LocalizedTextLineElement object.
getAuxiliaryRegionElements Get all the auxiliary region elements in an array of AuxiliaryRegionElement.
getAuxiliaryRegionElementsCount Get the number of auxiliary region elements in this unit.
getAuxiliaryRegionElement Get the auxiliary region element at the specified index.
setAuxiliaryRegionElement Set or replace the auxiliary region element at the specified index.
addAuxiliaryRegionElement Add a new auxiliary region element to this unit.
removeAuxiliaryRegionElement Remove the auxiliary region element at the specified index.
removeAllAuxiliaryRegionElements Remove all the auxiliary region elements from this unit.

getLocalizedTextLines

Get all the text lines in an array of DSLocalizedTextLineElement, which is the basic unit of the localized text line result.

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

Return value

All the text lines in an array of DSLocalizedTextLineElement, which is the basic unit of the localized text line result.

getCount

Get the number of text lines in this unit.

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

Return value

The number of text lines in this unit.

getLocalizedTextLine

Get the localized text line at the specified index in a LocalizedTextLineElement object.

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

Parameters

index: The index of the localized text line to be retrieved.

Return value

The localized text line at the specified index in a LocalizedTextLineElement object.

removeAllLocalizedTextLines

Remove all the localized text lines from the unit.

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

removeLocalizedTextLine

Remove a localized text line from the unit.

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

Parameters

index: The index of the localized text line to be removed.

Return value

Returns the ErrorCode if failed. Otherwise, returns 0.

addLocalizedTextLine

Add a localized text line to the unit.

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

Parameters

element: A LocalizedTextLineElement object as the localized text line to be added to the unit.

matrixToOriginalImage: The matrix to the original image.

Return value

Returns the ErrorCode if failed. Otherwise, returns 0.

setLocalizedTextLine

Set a localized text line in the unit.

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

Parameters

index: The index of the localized text line to be set.

element: A LocalizedTextLineElement object as the localized text line to be set.

matrixToOriginalImage: The matrix to the original image.

Return value

Returns the ErrorCode if failed. Otherwise, returns 0.

getAuxiliaryRegionElements

Get all the auxiliary region elements in an array of AuxiliaryRegionElement.

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

Return value

All the auxiliary region elements in an array of AuxiliaryRegionElement.

getAuxiliaryRegionElementsCount

Get the number of auxiliary region elements in this unit.

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

Return value

The number of auxiliary region elements.

getAuxiliaryRegionElement

Get the auxiliary region element at the specified index.

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

Parameters

index: The zero-based index of the auxiliary region element to retrieve.

Return value

The auxiliary region element at the specified index, or nil if the index is out of range.

setAuxiliaryRegionElement

Set or replace the auxiliary region element at the specified index.

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

Parameters

index: The zero-based index where the element should be set.

element: The auxiliary region element to set.

matrixToOriginalImage: The transformation matrix from the current image to the original image.

Return value

Returns the ErrorCode if failed. Otherwise, returns 0.

addAuxiliaryRegionElement

Add a new auxiliary region element to this unit.

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

Parameters

element: The auxiliary region element to add.

matrixToOriginalImage: The transformation matrix from the current image to the original image.

Return value

Returns the ErrorCode if failed. Otherwise, returns 0.

removeAuxiliaryRegionElement

Remove the auxiliary region element at the specified index.

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

Parameters

index: The zero-based index of the auxiliary region element to remove.

Return value

Returns the ErrorCode if failed. Otherwise, returns 0.

removeAllAuxiliaryRegionElements

Remove all the auxiliary region elements from this unit.

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

This page is compatible for: