Hello, I’m running processing on my RaspberryPi 4 with the RaspberryPi Camera Module v2.1. I am currently just capturing a video stream - see code below. My problem is that when I run the sketch, the video is very zoomed in as the resolution of the camera is obviously not scaled to the correct window size of the sketch. Seems like it should be a simple fix, however I’m quite new to this and cannot figure it out. When running it on my Mac, it scales automatically. Thought PImage resize may work but unsure how to adapt that to video. Any help would be greatly appreciated.
import processing.video.*;
Capture video;
void setup() {
size(640, 480);
String[] camera = Capture.list();
video = new Capture(this, Capture.list()[0]);
video.start();
}
void captureEvent(Capture video) {
video.read();
}
void draw() {
background(0);
image(video, 0, 0);
}
Thanks