Ask Your Question

How does resizing an image affect the intrinsics?

asked 2017-05-21 14:37:11 -0500

stillNovice gravatar image

Hi there, i have calibrated a camera using images at 1280 * 720. the intrinsic data is:

  1280 720</cameraResolution>
<camera_matrix type_id="opencv-matrix">
    6.5700301862152855e+02 0. 6.4669706479436286e+02 0.
    6.5700301862152855e+02 3.4711751174913059e+02 0. 0. 1.</data></camera_matrix>

So the focal length is:


and the center pixels are:

cx = 646.69706
cy = 347.11751

Now, to speed up my algorithm, I have resized the images by half, to give a resolution of:


My question is, how do I need to adjust my intrinsic matrix to match? I assume i need to half the cx and cy values, but the focal stays the same? Is this correct?

Thank you.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2017-05-21 14:46:37 -0500

LBerger gravatar image

updated 2017-05-21 14:49:48 -0500

657.003=a then a = f . m where f is focal length in meter and m number of pixel by meter (inverse of pixel size). if you have resize the images by half it means pixel size is double then a becomes 328.5 (ref. multiple view in geometry p157)

resize means using opencv function and not changing resoultion using method set of videocapture class

edit flag offensive delete link more


Explained perfectly. thank you!

stillNovice gravatar imagestillNovice ( 2017-05-21 15:16:24 -0500 )edit

answered 2019-06-18 13:07:47 -0500

r7vme gravatar image

Just a bit extension of answer of @LBerger for case with changed aspect ratio.

Let's say you have resized image (cv2.resize) and changed aspect ratio. e.g. was 1242 x 375 now 512 x 256. Then you need to multiply first row (x) with width scale scale_x = 512 / 1242 and second row with height scale scale_y = 256 / 375

With numpy

edit flag offensive delete link more


According to the documentation, radial (k1, k2) and tangential (p1, p2) distortion coefficients remain unchanged in case of a change of resolution (one that preserves aspect ratio, I guess). What happens to distortion coefficients if aspect ratio changes too? Are they still left unaltered? And what about distortion coefficients when the fisheye camera model is used?

Massimo gravatar imageMassimo ( 2019-07-04 07:34:11 -0500 )edit

Question Tools



Asked: 2017-05-21 14:37:11 -0500

Seen: 4,443 times

Last updated: May 21 '17