The distortion coefficients do not change if you apply a binning to your image (e.g. to go to a quarter of your resolution). The camera matrix of course changes as it's the conversion from meters to pixels and your right most pixel suddenly is now in column 320 instead of 640.
ROS already provides some nice functions that are implemented in image_geometry::PinholeCameraModel.
In your case, initialize the class with your 640x480 calibration (with binning_x and binning_y set to 2 to get to your QVGA resolution).
Originally posted by NEngelhard with karma: 3519 on 2016-08-24
This answer was ACCEPTED on the original site
Post score: 1
Original comments
Comment by Cerin on 2016-08-24:
I'm confused. As is, are you saying it will work on won't work? When I view the 320x240 stream using image_view with the 640x480 calibration file, it looks fine. What component is interpreting pixels as meters?
Comment by NEngelhard on 2016-08-24:
"What component is interpreting pixels as meters?" The camera matrix converts a position (in meters) to pixels and therefore depends on the used resolution. So you don't need to recalibrate your camera but you have to adapt your calibration (or use the image_geometry-class)
Comment by Cerin on 2016-08-24:
That's still not making any sense to me. Maybe I'm not asking the right question. When I access my video stream, I'm getting JPEGs, and the images look fine. Where in the JPEG does it store the camera matrix and why would I care that this matrix isn't converting meters to pixels correctly?
Comment by NEngelhard on 2016-08-25:
The intrinsic matrix is not stored in the JPEG (although focal length could be given in an EXIF header). " why would I care that this matrix isn't converting meters to pixels correctly?" ??? Why would you ask if they are resolution agnostic if you don't care?