Remove unwanted parts of an image in an analog meter dials

asked 2019-08-13 03:28:02 -0500

Hi I am a beginner trying to solve a problem in ocr I have. I am trying to detect some meter reading of an analogue meter. I am currently using the amazon recognition service to extract readings from a meter in a react-native app. The process did not work very well so as part of trying to fix this. I implemented a cropping functionality in the app so we send only relevant part of the image to the service. I run into another problem. The analogue separators on the meter are interspersed such that they are read as ones.

image description

cropped image from the mobile app cropped image from the mobile app image description

What I have tried. I created a simple server application to try to remove these lines before we send the image to rekognito

  • Converted the image to greyscale
  • Applied Gaussian blur to remove some of the noise.
  • Applied the [canny algortihm (https://en.wikipedia.org/wiki/Canny_e...) to detect the edges. using opencv for node.

    guassianblur: new cv.Size(13, 13), 0, 0, cv.BORDER_DEFAULT cannny: 50 100

image description

The result look like this.

The output still has edges that looks like ones. is as I expect. I have been trying to figure out how to remove the interspersed edges leaving the clearly defined edge. is this a good approve. Can anyone help me remove those lines somehow. Thanks

My understanding of image processing concepts are very vague and I am unsure of this is a good way to fix this problem. I also don't know much about what I am doing :).

Can anyone help or suggest a better approach to removing the lines. Thanks in advance.

edit retag flag offensive close merge delete