Pages: [1]   Go Down
Author Topic: Pixel from video in processing to Arduino LEDs  (Read 805 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am building a "physical pixel"; put simply- a cube with RGB leds inside.
Essentially i would like this cube to display the changing colour values of a single pixel taken from a recorded video source (not a live video feed).

At the moment I am using an arduino, along with my mac and processing.

I am assuming the simplest way to do this would be to have processing take the single pixel from a playing .MOV file; and send it as RGB information to Arduino - which would then send the separate R,G and B information to the red, green and blue LEDs in the cube.
But maybe there is a simpler way of doing it?

I have only been working with the Arduino and processing for about a month - trying some of the example Arduino prototypes from their website, and messing around with some code from the built-in processing library.

Basically, I'm finding this project difficult to get my head around (code-wise).  I know all of the information (that I need to build this) is on the reference for both arduino and processing - but I don't know where to start.

Ideally I would find someone to write both processing and arduino codes for me, so i could try it out, and move onto the next (possibly non-arduino based) project. However, I realize -
(A) People with the knowledge are likely unwilling to just sit down and spend time writing code for complete strangers.
and (B) I wouldn't actually learn anything (and therefore I'd be unable to tweak/experiment with different ideas based on the same technique).

I guess the first step would be to write the Processing code?
Can someone tell me how I would go about writing the code for Processing to read and 'extract' the (changing) RGB values of a single pixel from a video file?
What parts of the processing reference pages do I need to familiarize myself with?



I hope this was clear enough - I know I'm likely to get weighed-in on for my first post asking for help.
cheers in advance for any pointers / help / whatnot
Lester
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 509
Posts: 31487
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I guess the first step would be to write the Processing code?
Yes look at the Video capture from the examples menu.
It is very easy just to get one pixel from a frame.

Next you have to communicate this to the arduino. I did this in my mini monome project:-
http://www.thebox.myzen.co.uk/Hardware/Mini_Monome.html
It also has the code for receiving the data. look at the lights test code rather than the monome code itself.

The problem you will then have is calibrating the colour of what you send down to the colour the lights produce, not as easy as it sounds.
Logged

0
Offline Offline
God Member
*****
Karma: 0
Posts: 572
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Seeing as how it's the same video over and over again - I'd cheat. Work out the RGB value you want at each timestep, "record" it, and replay it over and over on the arduino.

Then you just need to get the arduino to start "playing" at the same time as the video, which is A LOT easier than calculating values in real-time ever playing.

Of course you've got to work out the RGB values at least once - that bit;s up to you.
Logged

Pages: [1]   Go Up
Jump to: