not sure if I’m missing something really obvious
I’m using the stock camera code to extract an image from my webcam.
Processing lists 33 camers total
33 Available cameras:
0 name=Integrated Camera,size=640x480,fps=15
1 name=Integrated Camera,size=640x480,fps=30
2 name=Integrated Camera,size=320x180,fps=15
3 name=Integrated Camera,size=320x180,fps=30
4 name=Integrated Camera,size=320x240,fps=15
5 name=Integrated Camera,size=320x240,fps=30
6 name=Integrated Camera,size=352x288,fps=15
7 name=Integrated Camera,size=352x288,fps=30
8 name=Integrated Camera,size=424x240,fps=15
9 name=Integrated Camera,size=424x240,fps=30
10 name=Integrated Camera,size=640x360,fps=15
11 name=Integrated Camera,size=640x360,fps=30
12 name=Integrated Camera,size=848x480,fps=20
13 name=Integrated Camera,size=960x540,fps=15
14 name=Integrated Camera,size=1280x720,fps=10
15 name=Integrated Camera,size=640x480,fps=15
16 name=Integrated Camera,size=640x480,fps=30
17 name=Integrated Camera,size=320x180,fps=15
18 name=Integrated Camera,size=320x180,fps=30
19 name=Integrated Camera,size=320x240,fps=15
20 name=Integrated Camera,size=320x240,fps=30
21 name=Integrated Camera,size=352x288,fps=15
22 name=Integrated Camera,size=352x288,fps=30
23 name=Integrated Camera,size=424x240,fps=15
24 name=Integrated Camera,size=424x240,fps=30
25 name=Integrated Camera,size=640x360,fps=15
26 name=Integrated Camera,size=640x360,fps=30
27 name=Integrated Camera,size=848x480,fps=15
28 name=Integrated Camera,size=848x480,fps=30
29 name=Integrated Camera,size=960x540,fps=15
30 name=Integrated Camera,size=960x540,fps=30
31 name=Integrated Camera,size=1280x720,fps=15
32 name=Integrated Camera,size=1280x720,fps=30
however I cannot access some of these or rather some of these produce no output image.
import processing.video.*;
webcam cam;
void setup() {
size(1280, 720);
cam = new webcam(this);
}
void draw() {
cam.display();
// The following does the same, and is faster when just drawing the image
// without any additional resizing, transformations, or tint.
//set(0, 0, cam);
}
class webcam{
String[] cameras = Capture.list();
Capture cam;
PApplet applet;
webcam(PApplet app){
applet = app;
if (cameras.length == 0) {
println("There are no cameras available for capture.");
//exit();
} else {
println(cameras.length + " Available cameras:");
for (int i = 0; i < cameras.length; i++) {
println(i + " " + cameras[i]);
}
// The camera can be initialized directly using an
// element from the array returned by list():
cam = new Capture(app, cameras[28]);
cam.start();
}
};
void display(){
if (cam.available() == true) {
cam.read();
}
image(cam, 0, 0);
};
void display(float x, float y){
if (cam.available() == true)cam.read();
else println("no Cam");
image(cam, 0, 0);
};
};
the one I was trying to pick was the last one.