I have a recorded camera ROS bag file from a Realsense camera. The camera intrinsics for the recorded setting in already know. The initial resolution of the image is 848*480. Because of some visual obstruction in the FOV of the camera I would like to crop out the top of the image so it doesn't gets detected with Visual SLAM Algorithm I am using.
Since SLAM is heavily dependent on the Camera Intrinsics, I would like to know how will the camera parameters f_x
, f_y
, c_x
and c_y
change for :
There is no skew involved in the original camera parameters.
Will the new pricipal point c_x
also change as Cropped_image_width
?
I am bit confused as to how to calculate the new camera parameters ? Am I correct in assuming the following for the Case 1 - Cropped Case :
Cropping:
cx,cy
reduced by the amount of pixels cropped off the left/top. Cropping off of right/bottom edges has no effect.Scaling:
fx,fy
are multiplied by the scaling factorcx,cy
are multiplied by the scaling factorRemember, the principal point need not be in the center of the image.
Assuming top left image origin. Off-by-one/half (pixel) errors to be checked carefully against the specific scaling algorithm used, or just ignored.