Categories
Development

Cropping an image after detecting the corners using opencv python

I’m new one to openCV and computer-vision. Just now i’m trying to crop the Tiff scan after detecting the corners and then extract information from it based on exact coordinates x:y using python, openCV, numpy and OCR with Tesseract. What i achieved right now is that i upload an image (scan), binarize it, fix rotation […]

Categories
Development

Python Opencv: Filter Image for Text Detection

I have these set of images I want to de-noise in order to run OCR on : I am trying to read the 1973 from the image. I have tried import cv2,numpy as np copy_img=np.copy(img) #adaptive threshold as the image has different lighting conditions in different areas thresh = cv2.adaptiveThreshold(img, 255, cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY, 401, 20) […]

Categories
Development

OpenCV Each pixel in the return image from adaptiveThreshold function is value 255

I apply adaptive thresholding to gray scale image, and I would like to apply normal thresholding to the return image of that function. This doesn’t work since somehow every pixel in the return image is set to 255. I don’t understand why this is since imshow displays the return image from adaptive threshold as you […]

Categories
Development

cv2 digit-image postprocessing

I`m trying to implement the digits classifier by myself. And I faced some troubles with it. I’m training the NN on MNIST handwritten dataset, MNIST sample digit. But when I’m trying to predict what the digit is, I predicted from the image that I found and processed using cv2 – cv2 processed digit, as you […]

Categories
Development

What can I do to solve over-fitting problem in following code?

I’m trying to build a Handwritten word recognition using IAM Dataset and while training I’m facing over fitting problem. Would you please help me figure out what mistake I have made in code below. I have tried all the solution that I can find to resolve the problem but still the same overfitting problem persists. […]

Categories
Development

Cleaning image for OCR

I’ve been trying to clear images for OCR: (the lines) I need to remove these lines to sometimes further process the image and I’m getting pretty close but a lot of the time the threshold takes away too much from the text: copy = img.copy() blur = cv2.GaussianBlur(copy, (9,9), 0) thresh = cv2.adaptiveThreshold(blur,255,cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY_INV,11,30) kernel […]

Categories
Development Python

Extracting digits from image with python and OpenCV

I am looking for some coding solution/help to extract the digits from the LCD display and then output the value from the image. Below is the code and example images and how I got so far, but I need some further help to actually extract the “digits” from the image and output the value. I […]

Categories
Development

OCR on floorplan screenshots with pytesseract and OpenCV

I am trying to write a function that will take a jpg of a floorplan of a house and use OCR to extract the square footage that is written somewhere on the image import requests from PIL import Image import pytesseract import pandas as pd import numpy as np import cv2 import io def floorplan_ocr(url): […]

Categories
Development

OCR on floorplan screenshots with pytesseract and OpenCV

I am trying to write a function that will take a jpg of a floorplan of a house and use OCR to extract the square footage that is written somewhere on the image import requests from PIL import Image import pytesseract import pandas as pd import numpy as np import cv2 import io def floorplan_ocr(url): […]

Categories
Development

OCR on floorplan screenshots with pytesseract and OpenCV

I am trying to write a function that will take a jpg of a floorplan of a house and use OCR to extract the square footage that is written somewhere on the image import requests from PIL import Image import pytesseract import pandas as pd import numpy as np import cv2 import io def floorplan_ocr(url): […]