-2

I want to change the pixel value as compare to nearest pixels surrounding to it. I don't know how to do this and also I didn't try anything because I don't know how to do it.

I have images of number plates which are very blurred and distorted and have incomplete characters. I want to extract text from these images using "pytessaract" but even after image processing I am unable to get accurate results. I added three Images to question and I have more images similar to this or more worst than this.

Example image 1:

Image of number plate

Example image 2:

image of number plate

Example image 3:

image of number plate I have two problems:

  1. Bad quality images with incomplete texts
  2. Bad accuracy of tessaract-ocr due to low quality images
  • You may want to read https://stackoverflow.com/questions/4993082/how-to-sharpen-an-image-in-opencv –  Nov 13 '19 at 08:53
  • 5
    the solution is: get better images. you won't solve this through image-processing. I cannot read it and my brain beats any image-processing or machine learning based vision system on this planet – Piglet Nov 13 '19 at 08:58

1 Answers1

-1

Your question is a little bit to overwhelming in my opinion.

However you can try following:

  1. Convert input images to binary view (black and white only, adaptive threshold or Otsu's threshold may give good results in this case)
  2. Apply image morphology to binary image in order to sharpen letters (probably morphological opening will suit you most)

If you want to change pixel values based on their neighborhood you can do following:

  1. Inverse image (text pixels get white and have higher value than background pixels which turn black)
  2. (Optional) Apply filter to remove noise, e.g. median blur filter however this step can be merged with following
  3. Convolve inverted image with box filter. Apply threshold to output of the filter to leave only pixels with n+ white neighbors
f4f
  • 891
  • 5
  • 13