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: image-processing
How can I get the dimensions of a picture placeholder to re-size an image when creating a presentation and inserting a picture using python-pptx?
I’m trying to insert a picture that is re-sized to fit the dimensions of the picture placeholder from a template using python-pptx. I don’t believe the API has direct access to this from what I can find out in the docs. Is there any suggestion of how I might be able to do this, using the library or other? I
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 even tried taking a sample from
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, grayscale, Gaussian blur, and Otsu’s threshold to obtain a binary
Python / numpy: Remove empty (zeroes) border of 3D array
I have a 3D numpy array. This can be thought of as an image (to be exact it’s values of field points). I want to remove the border (0 values, note that there are negative values possible) in all dimensions. The restriction is that the dimension remains the same for all molecules, eg. I only want to remove the border
How to merge a transparent png image with another image using Scikit-image
This is basically the same question that was posted here: How to merge a transparent png image with another image using PIL but using with scikit-image instead of PIL. I mean to paste the png keeping its transparency on top of a background image. Also, if there is actually a way of doing it, I would like to know which
Simple method to extract specific color range from an image in Python?
I’m trying to extract a specific color from an image within a defined RGB range using the OpenCV for python module. In the example below I am trying to isolate the fire from the exhaust of the space shuttle between yellow and white RGB values and then print out the percentage of RGB values within that range compared to the
Data Augmentation in PyTorch
I am a little bit confused about the data augmentation performed in PyTorch. Now, as far as I know, when we are performing data augmentation, we are KEEPING our original dataset, and then adding other versions of it (Flipping, Cropping…etc). But that doesn’t seem like happening in PyTorch. As far as I understood from the references, when we use data.transforms
How to calculate nucleus amount of cell?
I am using Python 3.5 and OpenCV 3 to analyze pictures of cells in biology. My pictures look like this: I want to be able to calculate a ratio of the area of the cell’s nucleus to the area of the cell as a whole. In my slides, the nucleus is dark purple and other regions of the cell are
Image Type Error: OpenCV Python
I get an image type error when I run my code. I know HoughLinesP requires a grayscale image but when I try to convert the source image to grayscale I get the following error(1): error: (-215) depth == 0 || depth == 2 || depth == 5 in function cv::cvtColor If I run HoughLinesP without converting to grayscale I get