Webcam Capture - frameRate too low
in
Core Library Questions
•
1 years ago
Hey all,
i'm just working on some webcam capturing. It basically works fine so I use the built-in webcam of my macbook and display the image on the screen. But: As soon as I run the sketch on fullscreen the frameRate breaks down from 33 to 4 or 5 fps. I tested without using the filter(); -- this improved to frameRate up to 10 fps. But I need the captured image to be grayscale, so I don't want to get rid of this.
Do you have any suggestions how to keep the frameRate high? At least a few more fps than now.
- import processing.video.*;
- Capture myCapture;
- void setup()
- {
- size(screen.width, screen.height);
- myCapture = new Capture(this, width, height, 30);
- frameRate(100);
- }
- void captureEvent(Capture myCapture) {
- myCapture.read();
- }
- void draw() {
- println(frameRate);
- image(myCapture, 0, 0);
- filter(GRAY);
- }
1