I am trying to pick the numbers that an hydrometer shows, but the images generally are blurry and not so perfect…
I intend to have a monthly data set of the water consuption, automactly done through an mathematica code.
So I have 2 challenges:
1 - cleaning (using filters) the pics
2- taking just the numbers that are shown through the metering reading.
Any suggestion?
I use an very cheap smartphone, 5 megapixels of resolution.
(how can I attached images here??)
For pasting images into posts, please see this guide. For improving images you could start from basic functions like Sharpen and ImageAdjust. If more sophisticated filters are needed you may want to take look at the guides and examples in Image Processing & Analysis .
Hi Vitaly, I have been testing the filters. And also I read the tutorials and guides. But I am litlle confuse to use morphological imaging to pick the numbers. I am attaching the image.
I am no expert on this area, but how about aquirering an excerpt or “template” of each individual number on the hydrometer (From 0-9)? Therenext supply it to ImageCorrelate[]. Get the result of ImageCorrelate[], Binarize, ColorNegate, and finally supply it to MorphologicalComponents. Using MorphologicalComponenets, it seems you can get the locations using ComponentMeasurements[] (http://reference.wolfram.com/mathematica/ref/ComponentMeasurements.html?q=ComponentMeasurements&lang=en). That shoult at least, if you’re lucky and I am correct, give you the position of the numbers. That might make them easier to isolate
Hello Marcelo,
The Wolfram Broadcast contains a very impressive example where Markus van Almsick demonstrates a method of extracting notes from an image of a musical score. It is worth watching even if it doesn’t solve your problem perfectly. Also, you may be able to utilize the TextRecognize function after a bit more image pre-processing.