Class DocumentScanResult
java.lang.Object
com.codename1.ai.vision.DocumentScanResult
Corrected document pages returned as encoded image data. Pages are ordered
as detected and both construction and access make defensive copies, so the
result can safely cross asynchronous boundaries. The still-image scanner is
currently Apple-only; Android's ML Kit document API owns an interactive
camera flow and does not implement this analyzer contract.
-
Constructor Summary
ConstructorsConstructorDescriptionDocumentScanResult(byte[][] pages) Creates a corrected document scan without backend metadata.DocumentScanResult(byte[][] pages, VisionMetadata metadata) Creates a corrected document scan with backend diagnostics. -
Method Summary
-
Constructor Details
-
DocumentScanResult
public DocumentScanResult(byte[][] pages) Creates a corrected document scan without backend metadata.- Parameters:
pages- encoded corrected page images, deeply defensively copied
-
DocumentScanResult
Creates a corrected document scan with backend diagnostics.- Parameters:
pages- encoded corrected page images, deeply defensively copiedmetadata- backend details, ornull
-
-
Method Details
-
getPageCount
public int getPageCount()- Returns:
- number of corrected pages
-
getPage
public byte[] getPage(int index) - Parameters:
index- zero-based page index- Returns:
- defensive copy of that page's encoded image
-
getMetadata
- Returns:
- backend metadata, or
nullfor manually created results
-