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.
IndexProgramming Questions & HelpVideo Capture,  Movie Playback,  Vision Libraries › Video Capture Sample, dont want preview...
Page Index Toggle Pages: 1
Video Capture Sample, dont want preview... (Read 596 times)
Video Capture Sample, dont want preview...
Dec 1st, 2009, 4:14pm
 
I am using the video capture sample.  It writes out what the webcam sees to the little window the app is running in.  What i really want is in a separate function to save what the webcam sees like for instance when a key is pressed, but not have the webcam preview up unless a special key is held down.

I.e.
the web cam is on.
No preview is shown, instead other stats are up on the display.
When say key 1 is pressed, the webcam image is snapped and saved.  No image perview.
When key 2 is pressed, instead of stats being drawn on display.  Webcam image is being rendered.  I am not sure how to do this, the primary display is what is getting me...and I guess it has a constant variable known as g ?

I say it has a constant named g by this:
Code:


void draw()
{
image(myCapture, 0 ,0); //draws my webcam to the main window dont want this all the time
}
void sendImage()
{


 ImageToTwitter img = new ImageToTwitter(this);
 img.post(apiurl,"jpg-test","", "", msg, true, img.getBytes(g));
}
//what is the img.getBytes(g) doing?  its getting the image g from //somewhere, what type of image is that?


Still new to the way processing works and draws, looking for help here.

Thanks,
Shane
Re: Video Capture Sample, dont want preview...
Reply #1 - Dec 3rd, 2009, 12:38am
 
Fixed it.  It turns out image itself is setting the device context as i call it (g).  
Page Index Toggle Pages: 1