Using VisionKit, we can let user scan a document using camera like this:
let documentCameraViewController = VNDocumentCameraViewController()
documentCameraViewController.delegate = self
present(documentCameraViewController, animated: true)
But what should we do if the user browse a document from the iOS device locally without involving camera? Any chance we can still use visionkit to autocorrect on the paper orientation or edges?
u can use
UIImagePickerControllerto browse images locally.Instead of
VisionKit, you can useVisionto autocorrect on the paper orientation or edgesPrepare an Input Image for Vision
Create Vision Requests
Interpret Detection Results