paper_scanner_ios 0.1.3 copy "paper_scanner_ios: ^0.1.3" to clipboard
paper_scanner_ios: ^0.1.3 copied to clipboard

PlatformiOS

iOS implementation of paper_scanner, using Vision for document detection and CoreImage for perspective crop and filters.

paper_scanner_ios #

The iOS implementation of paper_scanner, using Apple Vision and CoreImage.

Apps should depend on paper_scanner (this package is pulled in automatically as the endorsed iOS implementation).

How it works #

Operation API
Detect VNDetectDocumentSegmentationRequest (iOS 15+), fallback VNDetectRectanglesRequest
Crop CoreImage CIPerspectiveCorrection
Filter CIColorControls (enhance), CIPhotoEffectMono (grayscale), CIColorThreshold/mono+contrast (black-and-white)

The document-segmentation request is runtime-gated to iOS 15+ and gracefully falls back to rectangle detection on older systems. Vision coordinates use a bottom-left origin and are flipped to the top-left origin used across the plugin.

Why Vision and not VisionKit? #

VisionKit's VNDocumentCameraViewController renders its own camera, crop and review UI (private ICDocCam* classes) and exposes only a results delegate — there is no way to restyle it. To build a custom UI we use the detection-only Vision requests instead.

Requirements #

  • iOS 13.0+ (platform :ios, '13.0').
  • Host app must declare NSCameraUsageDescription in Info.plist.
0
likes
150
points
176
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

iOS implementation of paper_scanner, using Vision for document detection and CoreImage for perspective crop and filters.

Homepage
Repository (GitHub)
View/report issues

Topics

#scanner #document #camera

License

MIT (license)

Dependencies

flutter, paper_scanner_platform_interface

More

Packages that depend on paper_scanner_ios

Packages that implement paper_scanner_ios