ocr

Detecting cardboard Box and Text on it using OpenCV

Detecting cardboard Box and Text on it using OpenCV Question: I want to count cardboard boxes and read a specific label which will only contain 3 words with white background on a conveyer belt using OpenCV and Python. Attached is the image I am using for experiments. The problem so far is that I am …

Total answers: 3

Unable to read captcha text with python tesseract and OpenCV

Unable to read image text with python tesseract and OpenCV Question: I am trying read text from this using Python with OpenCV. However, it is not able to read it. import cv2 as cv import numpy as np from matplotlib import pyplot as plt img=cv.imread(file_path,0) img = cv.medianBlur(img,5) ret,th1 = cv.threshold(img,127,255,cv.THRESH_BINARY) th2 =cv.adaptiveThreshold(img,255,cv.ADAPTIVE_THRESH_MEAN_C, cv.THRESH_BINARY,11,2) th3 …

Total answers: 1

Complete missing lines in table opencv

Complete missing lines in table opencv Question: I am trying to detect cells in bill image: I have this image Removed the stamp with this code: import cv2 import numpy as np # read image img = cv2.imread(‘dummy1.PNG’) # threshold on yellow lower = (0, 200, 200) upper = (100, 255, 255) thresh = cv2.inRange(img, …

Total answers: 1

Removing black background/black stray straight lines from a captcha in python

Removing black background/black stray straight lines from a captcha in python Question: I am trying read text from this image] using Python with OpenCV. However, black background in corners if this pic is messing with the text output and is giving wrong text. I tried to used Adaptive Gaussian Thresholding in OpenCV using code: import …

Total answers: 2

Having a hard time reading a text from png file using python

Having a hard time reading a text from png file using python Question: I’m having a hard time extracting the text CHUBB from this image above. I tried several image preprocessing techniques and pytesseract to extract them without success. My Output: x0c Expected output: ‘CHUBB’ Any help would be appreciated My attempt: import pytesseract img …

Total answers: 1

Check if the rectangle contour contains numbers inside or not? (OpenCV – Python)

Check if the rectangle contour contains numbers inside or not? (OpenCV – Python) Question: I know the quality is so so bad, but that’s original image gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) rectKern = cv2.getStructuringElement(cv2.MORPH_RECT, (85, 64)) blackhat = cv2.morphologyEx(gray, cv2.MORPH_BLACKHAT, rectKern) edges = cv2.Canny(light, 120, 255, 1) squareKern = cv2.getStructuringElement(cv2.MORPH_RECT, (3, 3)) light = cv2.morphologyEx(gray, cv2.MORPH_OPEN, …

Total answers: 1

How to check if a image has any text or not?

How to check if a image has any text or not? Question: I’m looking for a simple solution that would return a boolean if ANY kind of English text is present in an image file. I wish to use this to detect memes. For example, the following file should be detected as an image with …

Total answers: 3

Python Image Processing on Captcha how to remove noise

Python Image Processing on Captcha how to remove noise Question: I am so new on Image Processing and what I’m trying to do is clearing the noise from captchas; For captchas, I have different types of them: For the first one what I did is : Firstly, I converted every pixel that is not black …

Total answers: 3

How to use ctypes.util.find_library to import .so libraries in AWS lambda (python)?

How to use ctypes.util.find_library to import .so libraries in AWS lambda (python)? Question: What I’m trying A python package I’m using (OCRMYPDF) on Lambda needs the leptonica library liblept.so.5. On isolating the import code I found the issue is with find_library(‘lept’). Printing the result returns None. from ctypes.util import find_library def lambda_handler(event, context): liblept=find_library(‘lept’) print(“liblept:%s”%liblept) …

Total answers: 2