Processing Forum




Click on Join Now to Sign Up
My computer with web-camera can use processing video. WINVDIG and quicktime installed.
What should i do if i want to use another USB video camera ? How to decide which camera I am using ? How to selecet one of the two cameras ?
I tried to disable the computer-attached web-camera and connected the USB camera, run the sketch, the error told me that the sketch couldn't find a camera.
help me. please.
Thank you for your reply very much.
But i found that it didn't work yet.
If I connectted the web camera(not the build-in camera), i can see two cameras:[0] and [1] in processing by println( Capture.list() );
if I call capture with :video=new Capture(this,width,height,30); it by default activate the conectted camera instead of the build-in camera.
if I call capture with:
String ss[]=Capture.list();
video=new Capture(this,width,height,ss[0],30);
or
String ss[]=Capture.list();
video=new Capture(this,width,height,ss[1],30);
the connectted camera is activated (the light in it is on) and the error is always "Error while setting up Capture", the light of the build-in camera is off.
Why ?
Help me .
Thank you very much.
Dear, I still could not get a reasonable result. I am not sure whether I understood your comments.
I tried several expressionsbelow, it emits same error: Error while setting up Capture. Also, the connectted camera light is always on, the bild-in camera is always off, no matter [0] or [1] given.
(1): String ss[]=Capture.list();
video=new Capture(this,width,height,ss[0],30);
(2): String ss[]=Capture.list();
video=new Capture(this,width,height,ss[1],30);
(3): String ss[]=Capture.list();
video=new Capture(this,width,height,"[0]",30);
(4): String ss[]=Capture.list();
video=new Capture(this,width,height,"[1]",30);
(5): String ss[]=Capture.list();
video=new Capture(this,width,height,"ss[0]",30);
(6): String ss[]=Capture.list();
video=new Capture(this,width,height,"ss[1]",30);
(7):String ss[]=Capture.list();
video=new Capture(this,width,height,"[0] USB 视频设备-WDM",30);
(8):String ss[]=Capture.list();
video=new Capture(this,width,height,"[1] USB 视频设备-WDM",30);
PS: println( Capture.list() ); give below info:
[0] "USB 视频设备-WDM"
[1] "USB 视频设备-WDM"
What should I do ?
Thank you very much.