vision

How to track the barcode with highest confidence

自作多情 提交于 2021-02-10 14:33:51
问题 I am using vision framework to detect barcodes. I want to show a rect around the barcode with highest confidence on live video, meaning, I want to track that rect to the barcode seen on the live preview. So I have this code to detect the barcodes within a roi. lazy var barcodeRequest: VNDetectBarcodesRequest = { let barcodeRequest = VNDetectBarcodesRequest {[weak self] request, error in guard error == nil else { print ("ERRO: \(error?.localizedDescription ?? "error")") return } self?

Recording video in specified time intervals and then saving them into file OpenCv Python

自作多情 提交于 2021-02-07 10:51:57
问题 Here are my goals. Capture video continuously until 'q; is pressed Every ten seconds save the video in created directory file Continue step two until 'q' is pressed I am executing the following code. But when creating files it's creating 6kb files and saying cannot play. I am fairly new to opencv and python. Not sure what I am missing. Running this code on pycharm with Python 3.6. Also the cv2.imshow('frame',frame) stops after ten seconds but recording is happening in background and files are

How do I read an image from file for use with the `PyObjC Vision` framework?

喜夏-厌秋 提交于 2020-12-14 23:50:14
问题 I am trying to detect and decode barcodes from a library of images. In most cases pyzbar simply works (see code here). However, in some cases, my iPhone can decode the QR code but zbar fails. As I am on a mac, I can make use of the same Vision framework that the iPhone uses and there are even python wrappers to the macOS ObjC frameworks. I tried using Quartz.CGImageSourceCreateWithURL but that returns a None no matter what I pass it. def read_image(path): imageSrc = Quartz

How do I read an image from file for use with the `PyObjC Vision` framework?

孤者浪人 提交于 2020-12-14 23:40:57
问题 I am trying to detect and decode barcodes from a library of images. In most cases pyzbar simply works (see code here). However, in some cases, my iPhone can decode the QR code but zbar fails. As I am on a mac, I can make use of the same Vision framework that the iPhone uses and there are even python wrappers to the macOS ObjC frameworks. I tried using Quartz.CGImageSourceCreateWithURL but that returns a None no matter what I pass it. def read_image(path): imageSrc = Quartz

How can I add text-to-speech in tensorflow lite object detection android based application?

别等时光非礼了梦想. 提交于 2020-06-29 06:43:45
问题 I am trying to build an app that will help visually impaired individuals detect objects/hurdles in their way. So using the TensorFlow library and the android text-to-speech once an object is detected, the application will let the user know what the object is. I'm currently trying to build off the Android Object Detection Example provided by TensorFlow, however I'm struggling to find where the strings of the labels of the bounding boxes are stored so that I can call this when running the text

Separate crossings segments in binarised image

不羁岁月 提交于 2020-05-13 14:01:36
问题 I have some image processing that allows me to extract a binary image containing thick segments and i'm facing the issue that these segments may cross each other. Hence I need to find an efficient way to separate them, i'll have to implement this in C++ so anything OpenCV-based would help. Here is a sample input image, both "blobs" would need to be split in 3 different segments. I have tried 2 ideas until now, I'm stuck with both of them and that's why I'm asking here if there are any "state

Vision API Barcode - Restrict the detection area to center rect of screen

拥有回忆 提交于 2020-02-02 12:52:59
问题 I am implementing barcode scanner in my application. I would like to limit my detection area. followed the below logic but i doesn't work properly in some of the devices. //Trying to crop the center portion of the frame: public class BoxDetector extends Detector { private Detector mDelegate; private int mBoxWidth, mBoxHeight; public BoxDetector(Detector delegate, int boxWidth, int boxHeight) { mDelegate = delegate; mBoxWidth = boxWidth; mBoxHeight = boxHeight; } public SparseArray detect

Vision API Barcode - Restrict the detection area to center rect of screen

妖精的绣舞 提交于 2020-02-02 12:51:38
问题 I am implementing barcode scanner in my application. I would like to limit my detection area. followed the below logic but i doesn't work properly in some of the devices. //Trying to crop the center portion of the frame: public class BoxDetector extends Detector { private Detector mDelegate; private int mBoxWidth, mBoxHeight; public BoxDetector(Detector delegate, int boxWidth, int boxHeight) { mDelegate = delegate; mBoxWidth = boxWidth; mBoxHeight = boxHeight; } public SparseArray detect

How to translate X-axis correctly from VNFaceObservation boundingBox (Vision + ARKit)

此生再无相见时 提交于 2020-01-25 08:36:05
问题 I'm using both ARKit & Vision, following along Apple's sample project, "Using Vision in Real Time with ARKit". So I am not setting up my camera as ARKit handles that for me. Using Vision's VNDetectFaceRectanglesRequest, I'm able to get back a collection of VNFaceObservation objects. Following various guides online, I'm able to transform the VNFaceObservation's boundingBox to one that I can use on my ViewController's UIView. The Y-axis is correct when placed on my UIView in ARKit, but the X