Questions tagged [visionkit]

Visionkit is an ios framework, which helps to scan using the camera, process and use the result using corresponding callbacks or delegates.

As per apple, Vision kit helps to use the iOS camera to scan documents like those you capture in the Notes app.

SDKs Available - iOS 13.0+ - Mac Catalyst 13.0+

Main features derived implemented/defined as following

  1. Class
    • VNDocumentCameraViewController
    • VNDocumentCameraScan
  2. Delegate protocol
    • VNDocumentCameraViewControllerDelegate

For more details VisionKit

54 questions
0
votes
0 answers

Visionkit document text recognition failure

I am building a document scanning app with OCR using VisionKit. However when I use any of my document scans as the input, the text just comes out gibberish. I tried converting the input image to jpeg as well as png, but still yields the same result.…
Tyler Rutt
  • 567
  • 2
  • 8
  • 24
0
votes
0 answers

SwiftUI - Execute Vision functions on button tap

So I'm trying to use Vision + CoreML in an app, and yes sure, it works as expected using Apple's Resnet50 Model. However, I wish to only use Vision when the user taps a button. I believe this is the function that can detect what the object…
SwiftUser
  • 555
  • 6
  • 17
0
votes
1 answer

Unable to share multiple images using share sheet Swift

I am trying to save multiple images scanned using vision kit but only the first image seems to save using the share sheet. How do I rectify this issue. Saving the image after scanning for i in 0...scan.pageCount-1 { let originalImage =…
user12808336
0
votes
0 answers

Vision Kit - Extract Image Data in Dictionary - iOS

I had scan the image using Vision Kit framework and I was able to extract data in string but I want it in key value pair such like dictionary( [String: Any] ). private var ocrRequest = VNRecognizeTextRequest(completionHandler: nil) ocrRequest =…
devang bhatt
  • 460
  • 2
  • 15
0
votes
1 answer

VNRecognizeTextRequest doesn't recognize Dansk language "da-DK"

VNRecognizeTextRequest doesn't recognize special characters of Dansk language like Æ, æ, Ø, ø, Å ,å ,ß It replace these words with Æ to AE, Ø to 0,O, Å to A and so on. Below is my code for OCR Implementation. private func configureOCR() { …
0
votes
0 answers

Crash EXC_BAD_ACCESS only on device

I am getting crash on button click let requester = VNRecognizeTextRequest { request, error in guard let observations = request.results as? [VNRecognizedTextObservation] else { fatalError("Received invalid…
0
votes
1 answer

How to make sure the VisionImage (from Google's ML Kit in Firebase) object is processed right?

I am trying to read text from the image in Assets folder named "quote". But am getting the error "error 2: unable to process VisionImage" printed every time. How do I make sure VisionImage is processed the right way and get the text from the image…
-1
votes
1 answer

Image distortion correction iOS

How is it possible to achieve something similar to this result? Not talking about the contrast and color, but the way the lines are corrected and straight. This examples were taken from an iOS app Original Edited I already tried to…
-3
votes
1 answer

App Crashes When saving image to camera roll

When I try saving a scan to the camera roll the app crashes Here's the Code: func documentCameraViewController(_ controller: VNDocumentCameraViewController, didFinishWith scan: VNDocumentCameraScan) { // Make sure the user scanned at least one…
user12808336
1 2 3
4