Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webcam Application not working after Exporting as Full Screen Windows App #198

Open
cmdcsdept opened this issue Mar 7, 2022 · 1 comment

Comments

@cmdcsdept
Copy link

Here's the code I am using to access the webcam with Processing v3.5.4 on Windows 8.1 or Windows 10 Platform:

/************ CODE STARTS HERE ****************/
//Code Reference: https://processing.org/reference/libraries/video/Capture.html

import processing.video.*;

Capture cam;

void setup() {
size(640, 480);

String[] cameras = Capture.list();

if (cameras.length == 0) {
println("There are no cameras available for capture.");
exit();
} else {
println("Available cameras:");
for (int i = 0; i < cameras.length; i++) {
println(cameras[i]);
}

// The camera can be initialized directly using an 
// element from the array returned by list():
cam = new Capture(this, cameras[0]);
cam.start();     

}
}

void draw() {
if (cam.available() == true) {
cam.read();
}
image(cam, 0, 0);
// The following does the same, and is faster when just drawing the image
// without any additional resizing, transformations, or tint.
//set(0, 0, cam);
}
/************ CODE ENDS HERE ****************/

@benfry benfry transferred this issue from processing/processing Mar 7, 2022
@codeanticode
Copy link
Member

Probably caused by this: #205

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants