Friday, June 10, 2011

Update on Arduino imaging - Processing Sketch + Video!!!

Hi all,

As promised in this post, I am posting an update on the video acquisition for Arduino. Well so based on the constructive comments on the different spots this blog was highlighted, I coded a simple Processing Sketch.


Here you can see a couple of images taken from the Processing Sketch

Me in Processing (3 bits, 128x96 SCALE 5)

My Fluke MultiMeter in the same format


HERE YOU CAN DOWNLOAD  A COMPRESSED VERSION OF THE PACKAGE
Including Arduino, Processing and LabVIEW drivers, images and the hardware schematics


WARNING: It is the first code I write in Processing. So it is super inefficient.

Keep in mind the following limitations
a) It takes about 8 seconds to acquire a single image.
b) The target of the image needs to be still, othewise each little level change will come from a different image and the result will be messed up.

This code needs optimization in the following items
a) Make the arduino pack the data in bytes (it currently wastes room by sending a bit per byte, but there is a story about why I do that, I'll post the solution when I get to it in the future).
b) Modify the processing sketch to read that format.
c) Currently the code acquires an image, idles for 1 second and loops. It might be wise to have some trigger event, but that is up to your application.


Video (shot with my Ipod Touch so hence the funny aspect ratio).





Down the road, my plans are
- Making the optimizations mentioned above
- Trying the flash/SD temporary storage approach
- Others

Leave comments if you guys do something related to this!!

1 comment:

  1. As I have a Video Experimenter, I tried your code but the Processing screen keeps black. In the serial monitor, I found that Arduino sends the information, but Processing does not read the c value; c is allways -1.
    How can I turn around this?

    ReplyDelete