1

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?

Anjali Shah
  • 720
  • 7
  • 21
mkto
  • 4,584
  • 5
  • 41
  • 65

1 Answers1

1

u can use UIImagePickerController to browse images locally.

Instead of VisionKit, you can use Vision to autocorrect on the paper orientation or edges

  • Prepare an Input Image for Vision

  • Create Vision Requests

  • Interpret Detection Results

apple's sample

dengApro
  • 3,848
  • 2
  • 27
  • 41
  • 1
    Sounds like still a lot of work to do to autocorrect the distortion of the paper etc. – mkto Apr 01 '20 at 03:43