Currently, I am working on an OCR project where I need to read the text off of a label (see example images below). I am running into issues with the image skew and I need help fixing the image skew so the text is horizontal and not at an angle. Currently the process I am using attempts to score different
Tag: opencv
How to convert color with OpenCV?
I am struggling with converting red color to another color, blue, yellow, green and so on. I’ve already achieved to convert red color to gray scale color as bellow. But what I really want to achieve is turn a color into another one but not gray scale. How should I change the code or any good reference? …
List available cameras OpenCV/Python
I have multiple webcams connected to my PC and I would like to select one camera based on its info (name, resolution etc.). Is there a way to list all the cameras available on a PC, instead of trying all the indices in cv2.VideoCapture()? Answer The answer is negative. OpenCV doesn’t have a method for l…
CUDA(GPU) as OpenCV backend
Am trying to use CUDA as backend for dnn module provided in opencv-4.1.1 , I have build opencv with CUDA enabled, nvidia drivers and CUDA is properly placed on system, here am using manjaro as development platform. am trying to load pre-trained YOLOv3 weights using cv2.dnn module, But it uses CPU as defualt i…
OpenCV Drawing Contour Error Assertion Failed
So I am trying to follow guide on how to scan a document in https://www.pyimagesearch.com/2014/09/01/build-kick-ass-mobile-document-scanner-just-5-minutes/ exactly on the step 2 process where i am supposed to find the contour and draw it to the image, i got an “Assertion Failed” error on drawConto…
How to read MKV bytes as video?
I am receiving fragment of MKV video in bytes. I need to take 1st frame of it for later processing without saving video in disk. For similar problem with image I use OpenCV or PIL and everything works fine, however, I am not able to do the same with video data. Any tips how to read video from bytes to
How can i make OpenCV work fully on Raspberry Pi 4 (Raspbian Buster)?
I have tried many days to install OpenCV on my Raspberry Pi 4 with Raspbian Buster but i couldn’t get it done. The installation in most cases worked but when importing or using cv2 methods like cv2.imshow(), errors come up (see below). Did somebody get OpenCV working on a Raspberry Pi 4 or has an idea o…
How to remove small particle background noise from an image?
I’m trying to remove gradient background noise from the images I have. I’ve tried many ways with cv2 without success. Converting the image to grayscale at first to make it lose some gradients that may help to find the contours. Does anybody know of a way to deal with this kind of background? I eve…
How to detect and find checkboxes in a form using Python OpenCV?
I have several images for which I need to do OMR by detecting checkboxes using computer vision. I’m using findContours to draw contours only on the checkboxes in scanned document. But the algorithm extracts each and every contours of the text. Input Image: Answer Obtain binary image. Load the image, gra…
Tensorflow’ pb and pbtxt files don’t work with OpenCV after retraining MobileNet SSD V1 COCO
I have followed this tutorial to retrain MobileNet SSD V1 using Tensorflow GPU as described and got 0.5 loss after training using GPU (below more info about config) and got model.ckpt. This is the command I used for Training: python ../models/research/object_detection/legacy/train.py –logtostderr –…