How to reliably detect a barcode's 4 corners in real time video capture
问题 I found a Stackoverflow answer for detecting barcode in an image. I am trying to apply the method in the Stackoverflow answer to realtime video capture because my current solution only detect barcodes on clean large surface. How can I apply the method to video capture Here is my code. import cv2 import numpy as np from pyzbar.pyzbar import decode cap = cv2.VideoCapture(0) cap.set(3,640) cap.set(4,480) while True: success, img = cap.read() for barcode in decode(img): myData = barcode.data