The Document Finder identifies documents in photos and helps you decide which processing steps to run before generating the final output.
In Genius Scan, we use it to power our gallery picker by surfacing only the images that look like documents. Once a photo is selected, the finder tells us whether it still needs perspective correction or if it is already a neatly cropped scan—allowing us to skip straight to filtering for processed documents or even leave digital files untouched.
Warning: Document Finder instances are somewhat expensive to instantiate—reuse the same object when analyzing multiple images in a row.
import GSSDK
let documentFinder = GSKDocumentFinder()
let result = try documentFinder.findDocument(inImage: image)
switch result.imageType {
case .noDocument:
// Show guidance to capture a document
case .unwarped:
// Run perspective correction with ScanProcessor before exporting
case .warped:
// Only apply an enhancement filter
case .enhanced:
// Optionally run readability checks, then export
}
import com.geniusscansdk.core.DocumentFinder
import com.geniusscansdk.core.DocumentFinder.ImageType.*
val documentFinder = DocumentFinder(context)
val result = documentFinder.findDocumentInImage(imageFile)
when (result.imageType) {
NoDocument -> {
// Ask the user to retake the picture
}
Unwarped -> {
// Run perspective correction with ScanProcessor, then enhance
}
Warped -> {
// Only apply enhancement filters before export
}
Enhanced -> {
// Optionally run readability checks, then export
}
}
Android enum | iOS enum | Description | Recommended follow-up |
---|---|---|---|
NoDocument |
.noDocument |
No document was detected in the image. | Ask the user to retake the picture or fallback to manual import. |
Unwarped |
.unwarped |
A document is visible but no crop or perspective correction has been applied yet. | Run the document detector and apply perspective correction before exporting. |
Warped |
.warped |
The document has been cropped and perspective corrected. | Skip perspective correction and only apply an enhancement filter or readability checks. |
Enhanced |
.enhanced |
Crop/perspective correction and an enhancement filter have already been applied. | Go straight to readability checks or export. |
After classifying a capture with the Document Finder, call ScanProcessor
to apply the appropriate corrections and filters:
© 2025 The Grizzly Labs. All rights reserved.