|
Author |
Topic: Grabbing Video Pixel Data / Make a 3d Histogram (Read 961 times) |
|
supermauerbros
|
Grabbing Video Pixel Data / Make a 3d Histogram
« on: Dec 7th, 2004, 7:35pm » |
|
Hello everyone, I'll quickly introduce myself. My name is Jake Mauer and I'm an Interactive Media student at the Maryland Institute college of art in Baltimore, MD. I've recently been getting my feet wet with processing and have been experimenting with it for some projects. My idea for the project is to grab pixel data from a camera, a webcam in this case, and to use the RGB data of each pixel and apply that to a 3d grid. Meaning that on a scale of XYZ the 0-255 Red value would place a pixel somewhere on X, the Green value determines placement of that pixel on the Y, and blue on the Z. The image I have in my head is that this would create a 3d cloud of pixels. The first task would be to gather the pixel data into an array. Second is to map this array onto a 3d grid. Through conversations with my instructor I've determined that this program doesn't seem to impossible, but I'm at a loss as of where to start. Here's some code for a simple pixel grab program I made. Quote: void setup() { size(320,240); beginVideo(width, height, 60); } void loop() { image(video,0,0,320,240); color c = get(mouseX, mouseY); noStroke(); fill(c); rect((mouseX-5),(mouseY-5), 25, 25); } |
| Simple I know but I had to start somewhere. Alright I think that's long enough. I will gladly take all suggestions and criticisms as any help towards getting this project done will be stupendous. Thanks again and I'm glad to be a part of the community.
|
« Last Edit: Dec 7th, 2004, 7:41pm by supermauerbros » |
|
|
|
|
fjen
|
Re: Grabbing Video Pixel Data / Make a 3d Histogra
« Reply #1 on: Dec 7th, 2004, 10:14pm » |
|
hi jake, think about how you described the (video-)image ... it already is an array containing the data for your 3D object. you should only make sure that you make a copy of it, otherwise the grabber will write into it while you are reading from it ... possibly. BImage video_copy = video.copy(); now run thru the pixel-array (video_copy.pixels) and pop that points into space ... /F
|
|
|
|
|