Table of contents

DetectedQuadsUnit

The DetectedQuadsUnit class represents an intermediate result unit whose type is detected quads. It is inherited from the IntermediateResultUnit class.

Definition

Namespace: com.dynamsoft.ddn.intermediate_results

Assembly: DynamsoftDocumentNormalizer.aar

class DetectedQuadsUnit extends IntermediateResultUnit

Methods

Methods Description
getDetectedQuads Gets an array of DetectedQuadElement objects, each containing the information of a single detected quadrilateral.
getCount Gets the number of detected quadrilaterals.
getDetectedQuad Gets a detected quadrilateral.
removeAllDetectedQuads Removes all detected quadrilaterals.
removeDetectedQuad Removes a detected quadrilateral.
addDetectedQuad Adds a detected quadrilateral.
setDetectedQuad Sets a detected quadrilateral.

The following methods are inherited from class IntermediateResultUnit.

Method Description
getHashId Returns the hash ID of the unit.
getOriginalImageHashId Returns the hash ID of the original image.
getOriginalImageTag Returns the image tag of the original image.
getType Returns the type of the intermediate result unit.
getTransformMatrix Returns the transformation matrix via DSTransformMatrixType.
clone Creates a copy of the intermediate result unit.
replace Replaces the content of the intermediate result unit.

getDetectedQuads

Gets an array of DetectedQuadElement objects, each containing the information of a single detected quadrilateral.

DetectedQuadElement[] getDetectedQuads()

Return Value

The array of DetectedQuadElement.

getCount

Gets the number of detected quadrilaterals.

int getCount()

Return Value

The number of detected quadrilaterals.

getDetectedQuad

Gets the DetectedQuadElement at the specified index.

DetectedQuadElement getDetectedQuad(int index)

Return Value

A DetectedQuadElement object that represents the detected quadrilateral.

removeAllDetectedQuads

Removes all detected quadrilaterals.

void removeAllDetectedQuads()

removeDetectedQuad

Removes the detected quadrilateral at the specified index.

int removeDetectedQuad(int index)

Parameters

[in] index: The index of the quadrilateral to remove.

Return Value

Returns the ErrorCode if failed. otherwise, returns 0.

addDetectedQuad

Adds a DetectedQuadElement to the unit.

int addDetectedQuad(DetectedQuadElement element, Matrix matrixToOriginalImage)

Parameters

[in] element: The DetectedQuadElement object to add.

[in] matrixToOriginalImage: The matrix to the original image.

Return Value

Returns the ErrorCode if failed. Otherwise, returns 0.

setDetectedQuad

Sets the DetectedQuadElement at the specified index.

int setDetectedQuad(int index, DetectedQuadElement element, Matrix matrixToOriginalImage)

Parameters

[in] index: The index of the quadrilateral to set.

[in] element: The DetectedQuadElement object to set.

[in] matrixToOriginalImage: The matrix to the original image.

Return Value

Returns the ErrorCode if failed. Otherwise, returns 0.