views:

498

answers:

2

I want to develop an application in java to capture video from webcam and store it onto a particular location.Can anyone provide me the working code?

What type(usb,ip etc..) of webcam is the best in order to develop the application.

Please help me. how to proceed?

A: 

I found that the best way is by using the JMyron library with a USB webcam. You will have to mess around with the dll's though because it uses native code... there's a working example somewhere if you google for it (I don't know exactly where) but I know that you need the dll's in your path. Download the Processing library and find the dll's and the jar.

import JMyron.JMyron;

//initializer
int width=100;//insert your numbers here
int height=100;
JMyron jmyron = new JMyron();
jmyron.start(width,height);
//in a loop
jmyron.update();
int[] image = jmyron.image();

image will be an int[] with length width*height. it stores the pixels row-by-row, so the first width pixels will be the first row, the second width pixels will be the second row, and so on.

Professor_Calculus
@i.psiit says the output at the bottom, underneath the code.
Professor_Calculus
A: 

@ Professor_Calculus


whats the output format ?

thanks.

i.Psi