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
My Webcam Server and Client :) (Read 478 times)
My Webcam Server and Client :)
Feb 25th, 2006, 3:51pm
 
Hi,
After being really frusterated at the lack of webcam connectivity between mac and windows, I went ahead and made my own webcam client and server. The server transmits the webcam from your machine and the client simply displays a window. It currently runs in greyscale, 160*120, but it wouldn't be too hard to change this.

www.staronesw.com/webcam/WebCam.pde
www.staronesw.com/webcam/WebCamClient.pde

Instructions are at the top of the source files, you will have to change it to reflect your own server and your webcam model.

The basic idea for the server is:

Each time the webcam reads a frame:
copy the grey value of the pixels to a byte array
send the byte array

and the Client:

read any bytes that are available to the cue
once the cue builds up to 160*120 bytes:
dump it to the pixel buffer
display the pixel buffer each time it fills

Have fun! :)
Page Index Toggle Pages: 1