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
2
votes
1 answer

iOS 13 - Camera hangs in VNDocumentCameraViewController

When using VisionKit's VNDocumentCameraViewController for scanning documents the camera hangs after some seconds. The scan is implemented in a ViewController, which is used in SwiftUI. The implementation of a DocumentScannerViewController: import…
user5331311
1
vote
0 answers

How do I detect when the user drags a lifted subject from ImageAnalysisInteraction?

I am using ImageAnalysisInteraction to allow the user to press and hold part of image to lift it and drag it somewhere else. I got the drop part working, but how do I detect when they started dragging? The delegate and interaction function below…
Streetlamp
  • 1,537
  • 2
  • 15
  • 27
1
vote
1 answer

How to make VNDocumentCameraViewController forget previous scans?

By displaying the VNDocumentCameraViewController on iOS it automatically stores previous scans. This can be problematic for users who don't realize they are adding already scanned documents to their current scan. Looking at the official VisionKit…
svprdga
  • 2,171
  • 1
  • 28
  • 51
1
vote
0 answers

Limit DataScannerViewController text recognition | Swift/Xcode/VisionKit

I'm attempting to make the DataScannerViewController (VisionKit) only recognize VIN numbers. Currently, when I hold the camera up to a data plate, it reads all kinds of text, so I can't just grab the VIN number. I would like for the camera to ONLY…
Christian W
  • 353
  • 2
  • 12
1
vote
1 answer

VNDocumentCameraViewController disable Auto Scan

VNDocumentCameraViewController scans the documents automatically. I want to scan documents only when user taps shutter button. Is there any way to accomplish this?
1
vote
0 answers

Why is my ml model returning VNCoreMLFeatureValueObservation instead VNRecognizedObjectObservation?

I'm training a machine learning model in PyTorch using YOLOv5 from Ultralytics. CoreMLTools from Apple is used to convert the PyTorch (.pt) model into a CoreML model (.mlmodel). This works fine, and I can use it in my iOS App, but I have to access…
Joba
  • 828
  • 9
  • 28
1
vote
0 answers

How to get the filters in VNDocumentCameraViewController without open a camera in iOS?

There are 4 filters in VNDocumentCameraViewController, "Color", "Grayscal", "Black & White", "Photo". Is there a way to apply the filters on UIImages directly without open a camera?
Patrick
  • 262
  • 3
  • 12
1
vote
0 answers

Face position using visionKit in ARKit

I added visionKit face detection on an ARSCNView, it cab detect the face, here how I did that public func renderer(_ renderer: SCNSceneRenderer, updateAtTime time: TimeInterval) { let faceDetectionRequest =…
1
vote
2 answers

How can I get selected text from ImageAnalysisInteraction on UIImageView?

I work on an iOS app that displays images that often contain text, and I'm adding support for ImageAnalysisInteraction as described in this WWDC 2022 session. I have gotten as far as making the interaction show up and being able to select text and…
Tom Hamming
  • 10,577
  • 11
  • 71
  • 145
1
vote
1 answer

Using Vision and RealityKit Rotates Counterclockwise and Distorts(Stretches?) Video

I am attempting to learn object detection in iOS, and then mark the place of the detected object. I have the model trained and installed in the project. My next step is to show an AR View on screen. That is working. When I turn my vision processing…
Yrb
  • 8,103
  • 2
  • 14
  • 44
1
vote
0 answers

Understand AVFoundation videoOrientation and Vision Request Handler Orientation

I'm try to understand what I'm doing wrong on my project. I'm try to draw a box over a detected face using vision kit. I first set up the back camera with the following method. func configureSession(){ // controllo se ho ricevuto auth a…
Damiano Miazzi
  • 1,514
  • 1
  • 16
  • 38
1
vote
0 answers

VNRecognizeTextRequest stopped recognising text in iOS 15

I'm using VNRecognizeTextRequest via VNImageRequestHandler with following settings: request.recognitionLevel = .accurate request.usesLanguageCorrection = false request.recognitionLanguages = ["en-US", "de-DE"] I'm using real time capturing from…
Ivan Androsenko
  • 608
  • 6
  • 15
1
vote
0 answers

Specific position to detect text via Vision Framework

Its possible to specify position on image where to detect text? I searched everywhere on the net but could not get an answer. I know it's possible detect rectangles, faces, text, and barcodes but my idea is to go to certain (eg x = 50, y = 50)…
Hrvoje
  • 696
  • 7
  • 22
1
vote
1 answer

How to use iOS VisionKit when browsing a document from local library?

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…
mkto
  • 4,584
  • 5
  • 41
  • 65
1
vote
0 answers

how to parse first name and last name from pancard using Visionkit in ios swift?

I have been trying to parse pan card details to appropriate fields. But I could not parse correctly. Here I have used regex to find pan card number and date of birth and results perfect. But I could not able find the first name and last name…
PvDev
  • 791
  • 21
  • 67