How does camera distortion coefficients and camera intrinsic parameters change after image crop or resize?

831 Views Asked by At

I try to make image some changes(crop, resize, undistort) and I want to know how distortion coefficients and camera intrinsinc parameters change after that.

  • Origin Image shape = [848, 480]
  • camera matrix = [[fx, 0, cx], [0, fy, cy], [0, 0, 1]]
  • distortion coefficients = [k1, k2, p1, p2]

crop

  • [848, 480] -> [582, 326]
  • fx, fy : no changes
  • cx, cy : cx -133, cy - 77
  • distortion coefficients -> ??

resize

  • [582, 326] -> [848, 480]
  • fx, cx -> 1.457fx, 1.457cx
  • fy, cy -> 1.472fy, 1.472cy
  • [k1, k2, p1, p2] -> [k1, k2, p1, p2] same

undistort

  • fx, fy, cx, cy -> same
  • [k1, k2, p1, p2] -> [0, 0, 0, 0]

Does anyone knows the answer?

For me I tried using my camera and calibrate some results but I don't know the exact equation.

origin

  • fx = 402.242923
  • fy = 403.471056
  • cx = 426.716067
  • cy = 229.689399
  • k1 = 0.068666
  • k2 = -0.039624
  • p1 = -0.000182
  • p2 = -0.001510

crop

  • fx = 408.235312 -> almost no change
  • fy = 409.653612 -> almost no change
  • cx = 297.611639 -> cx - 133
  • cy = 153.667098 -> cy - 77
  • k1 = 0.048520 -> I don't know
  • k2 = -0.010035 -> I don't know
  • p1 = 0.000943 -> I don't know
  • p2 = -0.000870 -> I don't know

crop_resize

  • fx = 598.110106 -> almost * 1.457
  • fy = 608.949995 -> almost * 1.472
  • cx = 430.389861 -> almost * 1.457
  • cy = 226.585804 -> almost * 1.472
  • k1 = 0.054762 -> I don't know
  • k2 = -0.025597 -> I don't know
  • p1 = 0.002752 -> I don't know
  • p2 = -0.001316 -> I don't know

undistort

  • fx = 404.312916 -> almost same
  • fy = 405.544033 -> almost same
  • cx = 427.986926 -> almost same
  • cy = 229.213162 -> almost same
  • k1 = -0.000838 -> almost 0
  • k2 = 0.001244 -> almost 0
  • p1 = -0.000108 -> almost 0
  • p2 = 0.000769 -> almost 0
1

There are 1 best solutions below

0
On

All part you write as "I don't know" will be "same(not changed)".
Because Cropping and Resizing is representable with only (cx,cy,fx,fy).