英文:
New Pinhole Camera Intinsics Matrix for the Cropped Image
问题
我给出以下示例来说明我的问题:假设我有一个遵循针孔相机模型的相机内参矩阵,其内参矩阵具有以下结构:
ori_intrinsics = [[fx, 0, cx],
[0, fy, cy],
[0, 0, 1]]
我还知道它可以生成大小为[ori_width, ori_height]
的图像。然后,我在图像位置[ori_left, ori_top, ori_right, ori_bottom]
进行裁剪。现在我有了一张新的图像。那么我的问题是:现在我有一个类似的相机(相同的针孔相机),它将生成与之前进行裁剪操作时相同的新图像,那么这个相机的内参是什么?
英文:
I give the following example to illustrate my question: suppose I have a camera intrinsics matrix that follows the pin-hole camera model, and its intrinsics matrix has the following structure:
ori_intrinsics= [[fx, 0, cx,],
[0, fy, cy],
[0, 0, 1]]
I also know the image it can generate of size [ori_width, ori_height]
. Then now I crop the image in the image position [ori_left, ori_top, ori_right, ori_bottom]
. Now I have a new image. Then my question is as follows: image now I have a similar camera(the same pin-hole camera) and it will generate the same new image without any cropping operation as I did before. What will be the camera intrinsics for this camera?
答案1
得分: 1
裁剪图像不会影响焦距,因此fx
和fy
不会改变。唯一会改变的是cx
和cy
,需要根据从左上角裁剪的量进行调整。
如果你通过L, T
进行裁剪,则:
c_newx = cx - L
c_newy = cy - T
英文:
Cropping an image does not affect focal length, so no change to fx, fy
. The only thing that will change is cx and cy, and this needs to be adjusted based on how much you have cropped from top-left.
If you crop by L, T
, then:
c_newx = cx - L
andc_newy = cy - T
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论