We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
Webcam capture into buffer (Read 774 times)
Webcam capture into buffer
May 6th, 2009, 11:34am
 
Hey all,

New to processing, i was reading and looked up the example for brightness tracking. Do you guys know if i can use capture to get a video stream from a web cam and instead of drawing it to screen just use it in the memory buffer by using PGraphics and createGraphics()

For example, as of now the brightness tracking program is as follows

Capture video;
video = new Capture(this, width, height, 30);


I want to do this but am not sure

PGraphics video;
video = new Capture(this, width, height, 30)


I know it doesn't make all that sense, but i would really appreciate your expertise.

Sincerely

IN
Re: Webcam capture into buffer
Reply #1 - May 11th, 2009, 6:05am
 
Did you try capturing video to the PImage, and then moving it to PGraphics?
Re: Webcam capture into buffer
Reply #2 - May 17th, 2009, 7:55pm
 
when using capture, it doesnt automaticaly draw the cam feed to the screen.

Capture video
video = new Capture(this,width,height,30);

the bit that draws it to the screen is

image(video,x,y,w,h);

if you dont have this line, it should draw it to the screen anyway. then you can just use video.read() to get an updated image from the camera, then video.loadPixels() to get the pixel data available to process.
Page Index Toggle Pages: 1