Im using ofVideoGrabber to grab a stream from a standard webcam and then scaling this up when drawing the texture from the camera to the screen using draw (x,y w,h)l. Im experiencing a big difference in rendering performance if I dont use the native resolution of the camera.
The camera’s native res is 320x240;
int w = 720; int h = 576; vidGrabber.initGrabber(cWidth,cHeight); // later in draw() videoGrabber.draw(0,0,ofGetScreenWidth(), ofGetScreenHeight());
this results in poor FPS.
int w = 320; int h = 240; vidGrabber.initGrabber(cWidth,cHeight); // later in draw() videoGrabber.draw(0,0,ofGetScreenWidth(), ofGetScreenHeight());
This results in a significant gain in performance. ie ~25 FPS faster.
The console output on the first test shows that a range of resolutions and color depths have been tried before it is successful.
Im trying to understand why there is a difference in performance and if i can build something into my app to make sure that the optimum/ native resolution is used.
Any help is much appreciated.
The cam is a Creative Webcam Live, im running winxp