DocumentDetector class

Detects documents in images.

Implemented types

Constructors

DocumentDetector()
Creates a new instance of the DocumentDetector class.
DocumentDetector.fromHandle(Pointer<id3DocumentDetector> handle)
Creates a new instance of the DocumentDetector class.

Properties

confidenceThreshold int
Confidence threshold, from 0 to 100+. Hint: Default value is 50. Lower threshold can increase number of false detection.
getter/setter pair
documentWidthRatio double
Ratio of the estimated width of the searched document in the image. Hint: Default value is 1.
getter/setter pair
handle Pointer<id3DocumentDetector>
Gets the native handle. return The native handle.
no setter
hashCode int
The hash code for this object.
no setterinherited
model DocumentModel
Model to be used for document detection. Hint: Default value is DocumentDetector2A.
getter/setter pair
processingUnit ProcessingUnit
Processing unit where to run the detection process. Hint: Default value is CPU.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
threadCount int
Number of threads to use for detection. Hint: Default value is 1. Allocating more than 1 thread here can increase the speed of the process.
getter/setter pair

Methods

alignDocument(DocumentImage sourceImage, DetectedDocument detectedDocument) DocumentImage
Aligns and crops the specified document on the specified image and returns a new DocumentImage.
detectDocument(DocumentImage image, Rectangle detectionZone) DetectedDocument
Detects a document on a delimited area of the specified DocumentImage and returns a DetectedDocument. Important: Document templates must be loaded before calling this method.
detectDocumentByName(DocumentImage image, String? documentName, Rectangle detectionZone) DetectedDocument
Detects a document with specified name on a delimited area of the specified DocumentImage and returns a DetectedDocument. Important: The relevant document template must be loaded before calling this method.
dispose() → void
Releases all resources used by this DocumentDetector.
getConfidenceThreshold() int
Gets the confidence threshold, from 0 to 100+. Hint: Default value is 50. Lower threshold can increase number of false detection.
getDocumentWidthRatio() double
Gets the ratio of the estimated width of the searched document in the image. Hint: Default value is 1.
getModel() DocumentModel
Gets the model to be used for document detection. Hint: Default value is DocumentDetector2A.
getProcessingUnit() ProcessingUnit
Gets the processing unit where to run the detection process. Hint: Default value is CPU.
getThreadCount() int
Gets the number of threads to use for detection. Hint: Default value is 1. Allocating more than 1 thread here can increase the speed of the process.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setConfidenceThreshold(int confidenceThreshold) → void
Sets the confidence threshold, from 0 to 100+. Hint: Default value is 50. Lower threshold can increase number of false detection.
setDocumentWidthRatio(double documentWidthRatio) → void
Sets the ratio of the estimated width of the searched document in the image. Hint: Default value is 1.
setModel(DocumentModel model) → void
Sets the model to be used for document detection. Hint: Default value is DocumentDetector2A.
setProcessingUnit(ProcessingUnit processingUnit) → void
Sets the processing unit where to run the detection process. Hint: Default value is CPU.
setThreadCount(int threadCount) → void
Sets the number of threads to use for detection. Hint: Default value is 1. Allocating more than 1 thread here can increase the speed of the process.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited