In the documentation for initGrabber, there’s a section that reads:
If the capture dimensions are not available it will setup capture for the next closest dimensions available. It is good to check what the actual size is before you start processing the pixels.
Followed by some example code that prints the achieved dimensions:
myGrabber.initGrabber(320,240); int grabW = myGrabber.getWidth(); int grabH = myGrabber.getHeight(); printf("asked for 320 by 240 - actual size is %i by %i", grabW, grabH);
What I’m confused about is that if I request a 320x240 grabber but my webcam’s capture resolution is 720p (1280x720), shouldn’t the actual size printed by the code above be something other than 320x240? Or does initGrabber automatically scale and/or crop the captured image to fit the dimensions (and only fails if it can’t somehow scale/crop the captured image)?