Table of contents

DSTextureDetectionResultUnit

The DSTextureDetectionResultUnit class extends the DSIntermediateResultUnit class and represents a texture-detection result unit. This class captures the results of texture analysis, specifically the spacing of texture patterns in both the x and y directions.

Definition

Assembly: DynamsoftCaptureVisionBundle.xcframework

  • Objective-C
  • Swift
  1. NS_SWIFT_NAME(TextureDetectionResultUnit)
    @interface DSTextureDetectionResultUnit: DSIntermediateResultUnit
    
  2. class TextureDetectionResultUnit : IntermediateResultUnit
    

Methods

Method Description
getXSpacing Gets the detected horizontal distance in pixels between consecutive texture patterns, providing an indication of the texture’s density and orientation within the image.
setXSpacing Sets the x-direction spacing of the texture.
getYSpacing Gets the spacing between texture stripes in the y-direction. Similar to xSpacing, this value measures the vertical distance between texture patterns. texture’s characteristics and spatial distribution.
setYSpacing Sets the y-direction spacing of the texture.

The following methods are inherited from class IntermediateResultUnit.

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.

getXSpacing

Gets the detected horizontal distance in pixels between consecutive texture patterns, providing an indication of the texture’s density and orientation within the image.

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

setXSpacing

Sets the x-direction spacing of the texture.

  • Objective-C
  • Swift
  1. - (void)setXSpacing:(NSInteger)xSpacing;
    
  2. func setXSpacing(xSpacing: Int)
    

getYSpacing

Sets the spacing between texture stripes in the y-direction. Similar to xSpacing, this value measures the vertical distance between texture patterns. texture’s characteristics and spatial distribution.

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

setYSpacing

Sets the y-direction spacing of the texture.

  • Objective-C
  • Swift
  1. - (void)setYSpacing:(NSInteger)ySpacing;
    
  2. func setYSpacing(ySpacing: Int)
    

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article: