Beispiel #1
0
 void setup() {
     ofSetVerticalSync(true);
     ofBackground(0);
     config = ofLoadJson("../../../SharedData/shared/config.json");
     float camWidth = config["camera"]["width"];
     float camHeight = config["camera"]["height"];
     float camFrameRate = config["camera"]["framerate"];
     device = config["camera"]["device"];
     if (device == "blackmagic") {
         cam = &blackmagicGrabber;
     } else {
         cam = &videoGrabber;
     }
     cam->setDesiredFrameRate(camFrameRate);
     cam->setup(camWidth, camHeight);
     clipping.allocate(camWidth, camHeight, OF_IMAGE_COLOR_ALPHA);
     toggleGrayscale = false;
     updateWindowShape();
 }