System to do number recognition

Go To Last Post
26 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I want to make a simples system to recognize numbers in a counter like this:

I know that an 8bits uC is not very powerful, but since I don't need to do the processing in real time I think that it should work.

I made this post to collect some opinions about the best way to do this project. Did you think that is possible to do this with an atmega? what will be the best sensor to capture a snapshot of the numbers?

Any sugestion is appreciated.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Would suggest you to use the camera in the mouse instead. The camera in the mouse is very low resolution, and atmega is definitely has the horse power to process this extremely low resolution camera. How accurate the result would be another question though.

cs

I'm happy ytd, today, and tmr :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Get it working on a PC, initially. You will then be able to choose a suitable MCU.

Leon Heller G1HSM

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Lets see... need a program to count to 999999 on an avr.... how about

char sw,swl,swonos;
long count;

void main(void){
  sw=(PINA & 0x01)==0; //switch is actuated
  swonos=sw && !swl;   //oneshot of sw going on
  swl=sw;              //remember last pass 
  if(swonos) count++;  //inc counter 
  //now save it or display it or whatever;
}

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If this is some sort of handheld scanner to read the numbers, I'd try a vertical line focus detector that you swipe across the face of each counter. The intensity distribution as a function of time would give the numbers. Use an illumination wavelength to maximize contrast.
If it's a fixed scanner, e.g. one that looks at a counter inside a high voltage dome, you surely have better things to do along with enough bucks to dedicate a TV camera and PC to the job.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bobgardner I think that you don't understood what I want to do, I want to use a photo sensor to capture a photo of the analogic counter and then I want that my atmega processe the image and find the number on it.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oh crap. Its a counter. There is something that triggers a count. Put a switch on it. Count it. Store the count in eeprom. Read it out on an lcd. Ditch that 60s mechanical stuff.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

But the objective of this project is keep the analog counters, and create a system that can read them and send counting to server.

The hard thing here is read from a mechanical counter

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

just tap into the signal that is feed to the mechanical counter.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

it's impossible, there are alot of counters of diferent things. They have in common the numbers and is that what I will try to analyse

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, I might consider:

I doubt an AVR will ever correctly decode the digits if the scanner/camera is hand held, and moved from counter to counter to read them. Each one will be at a little bit different angle, and distance. As already stated, this is a job for a PC.

I might connect into the trigger signal for the counter, as already suggested, and maintain BOTH the mechanical counter which any person can read, and an AVR counter running at the same time.

The AVR counters would be initialized to the mechanical counter's value when they were installed.

It would be "easy" for the AVR counter to use an IR LED to transmit the counter, (and checksum, etc.), to a handheld "reader", when it received a request for its data, i.e. a simple IR link. The handheld unit could display the counter's ID number, and its count.

Much easier, less expensive, and more reliable, than any optical recognition system.

Next Step: Get a Data Sheet for the mechanical counters being used. Then decide how to derive the trigger pulse for the AVR counter.

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You have no access to the counter input? Maybe as in a calibrated and sealed KWh meter?

If it is possible to install an AVR permanently on the counter then the AVR does not realy have to know the count. It only has to know when the count changes, because the count can only increment. That can be done easily with an (ir?) LED shining on the Least significant digit and catching the changes in reflection of the led with a photodiode.
(Add a lens or 2 for focusing?)

Maybe install a webcam on the counter?

If you have lots of counters which you want to log then it might be a good idea to get yourself a standard digital camera and make pictures of the counters and analyze them later on a pc. (Print bar codes or similar on the counters for identification).

Maybe use a camera which is especially designed for interfacing with microcontrollers. I once saw a camera which had no buttons or video output, It's only interface was I2C. Such camera's are often used for little robots.

If you tell us more about you setup we can give better feedback.

Doing magic with a USD 7 Logic Analyser: https://www.avrfreaks.net/comment/2421756#comment-2421756

Bunch of old projects with AVR's: http://www.hoevendesign.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes I will intend to use this ina sealed counters, so I can't change them. I like the idea of a photodiode and a led.

But to be perfect it would have to recognize the numbers through a sensor. If a atmega is not enought to recognize the numbers I think that I will send the photo to a pc and do the recognition work on the pc

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Does an iphone have a page scan algo in it? If so, you could just take a picture of it and email the number to wherever.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In this project I don't want a handheld equipment, I intend to create a fixed equipement to bind on all counters

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How will you read the counter with 6 character scanners in front of it?

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bobgardner wrote:
How will you read the counter with 6 character scanners in front of it?

Kandalf wrote:
what will be the best sensor to capture a snapshot of the numbers?

that is the very one question in the original post

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Scanner would have to be very small or invisible so it does not get into way when trying to look at the numbers.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes the scanner should be small and will be easily removable, so if we want to see the numbers, we remove it and after put it back again.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

April Fool's Day only lasts one day usually. I think you should tape a mic to it and count the clicks.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Paint each digit with a different radioative isotope and mount a Geiger counter in front of the device...

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A mic might get spoofed by an external sound... so tape a coil to it and read the pulse when the internal solenoid fires.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bobgardner wrote:
Does an iphone have a page scan algo in it? If so, you could just take a picture of it and email the number to wherever.

If phones can take a pic of a barcode and identify the product doing this should be easy. getting apple to approve the app would take longer...

Cheers,

Joey

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Not if you make them envision releasing the iCounter at the same time..

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

If phones can take a pic of a barcode and identify the product doing this should be easy. getting apple to approve the app would take longer...

Then use an Android phone. Just as good at barcode scanning - I love "Google Goggles"! In fact Google Goggles might already be able to spot numbers on a counter - it is very smart.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you to the ones that really tried to help me.

What I want to make is known as computer vision and is not impossible with a atmega (AVRCam). I only tried get some ideas how to do this.