Class CreditCardScanningResult

Contains the result of running the credit card scanner.

Example

Since the instance of the class contains objects backed by native resources (e.g. images) and implements AsyncDisposable it's highly recommended to use the await using syntax when an instance is created or is received from an API:

await using instance = await getCreditCardScanningResultFromAnApi();

Alternatively, one can explicitly call release method to release the native resources or use autorelease convenience function. If neither is used, the resource will be released when the instance is garbage collected which is not recommended.

Implements

  • AsyncDisposable

Constructors

Properties

creditCard: null | GenericDocument

Generic document containing credit card data. Not present, if status is FAIL.

detectionStatus: DocumentDetectionStatus

The status of the credit card detection step.

quad: Point[]

Coordinates of the detected credit card in the input image (clockwise from top-left).

quadNormalized: Point[]

Coordinates of the detected credit card in the input image (clockwise from top-left), normalized to the range [0, 1].

scanningStatus: CreditCardScanningStatus

The status of the credit card scanning step.

Methods

  • Returns Promise<void>

  • Returns Promise<void>