How do I access the inbuilt camera on my laptop?
in
Programming Questions
•
3 years ago
Hello,
I am a processing novice, and looking for some help.
Me and a buddy had made a project for University. It was originally implemented using a Mac and an external video camera. The program took the video from the camera's firewire input and used it.
Now I have taken the project on my own, developing it to work on my laptop (runs on windows and has an inbuilt webcam). I have adapted everything except the video, and need some help.
Below is some of the code from the version of the program running on the mac with a video camera inserted. I would be eternally grateful if somebody could suggest an amendment so it would use the feed from my inbuilt laptop cam instead.
::::::::::::::
import rwmidi.*;
import processing.video.*;
void setup(){
size (640, 480);
rectMode(CENTER);
video = new Capture(this, width, height, 30);
// Create an empty image the same size as the video
backgroundImage = createImage(video.width,video.height,RGB);
f = loadFont("AlBayan-Bold-48.vlw");
textAlign(CENTER);
instbox = true;
inst1 = true;
standby = loadImage( "standby640.jpg" );
stage = loadImage( "stage640.jpg" );
logo = loadImage( "logo640.jpg" );
instSize = 100;
input = RWMidi.getInputDevices()[0].createInput(this);
output = RWMidi.getOutputDevices()[1].createOutput();
start = false;
timer = new Timer(MaxTime);
timer.start();
}
::::::::
Let me know if you need more of the code. Thanks for any help
JamblePie
I am a processing novice, and looking for some help.
Me and a buddy had made a project for University. It was originally implemented using a Mac and an external video camera. The program took the video from the camera's firewire input and used it.
Now I have taken the project on my own, developing it to work on my laptop (runs on windows and has an inbuilt webcam). I have adapted everything except the video, and need some help.
Below is some of the code from the version of the program running on the mac with a video camera inserted. I would be eternally grateful if somebody could suggest an amendment so it would use the feed from my inbuilt laptop cam instead.
::::::::::::::
import rwmidi.*;
import processing.video.*;
void setup(){
size (640, 480);
rectMode(CENTER);
video = new Capture(this, width, height, 30);
// Create an empty image the same size as the video
backgroundImage = createImage(video.width,video.height,RGB);
f = loadFont("AlBayan-Bold-48.vlw");
textAlign(CENTER);
instbox = true;
inst1 = true;
standby = loadImage( "standby640.jpg" );
stage = loadImage( "stage640.jpg" );
logo = loadImage( "logo640.jpg" );
instSize = 100;
input = RWMidi.getInputDevices()[0].createInput(this);
output = RWMidi.getOutputDevices()[1].createOutput();
start = false;
timer = new Timer(MaxTime);
timer.start();
}
::::::::
Let me know if you need more of the code. Thanks for any help
JamblePie
1