1

I am doing a project to recognize the digits in a calculator screen. The full image is shown here .

After some image processing, I have extracted only the screen from the full image as shown here .

But the digits are getting overlapped. Can anyone suggest how to remove the bridges or connections between the images?? Would any morphological image processing using bwmorph() be of utility? Please help..

Cris Luengo
  • 55,762
  • 10
  • 62
  • 120
  • @Eitan T..no, the above link is different from my question. I asked how to remove the connections between digits, which is most prominent between '8' and '9' in the above figure. This is critical for segmenting the digits properly. – soumyadip.ghosh May 19 '13 at 15:31
  • Whatever you did to isolate the screen, you might use the coordinates from that process, but then take the corresponding part of the original image. – Ben Voigt May 19 '13 at 18:17
  • ^^but how will that help in removing the connections between the digits? – soumyadip.ghosh May 20 '13 at 16:18
  • There are no connections between digits in the original image. The process of conversion to monochrome has lost the contrast between the color of the digit and the color of the space between them, and some of your other processing has smudged the digits as well. – Ben Voigt May 20 '13 at 22:52

1 Answers1

0

May be you can try these two ideas see where it takes you 1). I would clean up the salt and pepper noise first. 2). then use erodedBW = imerode(originalBW,se) of course you have to play aroud with se to find the one that works best for you.

Sason Torosean
  • 562
  • 3
  • 18
  • Salt and pepper noise removal is okay. I know that the trick lies in eroding with the proper structuring element. On inspection of the bridges between digits, I saw that they were mostly rectangular( e.g - between 8 and 9), so I tried with ones(10,8) but it didn't help. Could you suggest a more appropriate se?? – soumyadip.ghosh May 20 '13 at 16:09
  • I don't have matlab on me now, but I think the strel function comes with some built in options for se. I tried 'line', with varying size and it made a good chunk of difference. Also if you really need to detect digits. You don't really have to fully separate them. Fist I would seperate a set of digits from 1:10 by hand and save them as a file. Then I use mutual information to see if any set of pixels correlate with your hand segmented pixels (digits). see this link. http://www.mathworks.com/matlabcentral/fileexchange/14888-mutual-information-computation Here is what I would do. – Sason Torosean May 20 '13 at 17:50
  • Also 'correlate' is the wrong word the correct word is if two set of pixels 'mutually depend' on each other. – Sason Torosean May 20 '13 at 17:57
  • For the digit recognition part, we will be using neural networks. But that will work accurately if the digits are segmented correctly. I tried with 'line' structuring elements in this image, but they are not completely removing the bridges or connections. Will improving the image quality help? – soumyadip.ghosh May 21 '13 at 17:27
  • That would certainly help. Also try investing some time learning what different bwmorph operations do (that is if you haven't done it), and combine it with the erode operation. bwmorph(bw, 'thin', n) and bwmorph with 'sekl' look promising. – Sason Torosean May 21 '13 at 18:37