Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Mock Camera Intrinsics

Hello,

I am following this post an amazing blog post to create a Perspective Transform for an arbitrary image.

https://www.blogger.com/comment.g?blogID=7023576929606369407&postID=5089486422033834180

This works well for square images, but has a problem with the aspect ratio when it comes to rectangular images.

I suspect it is the Camera Intrinsics that uses the field of view.

cv::Mat A2 = (cv::Mat_<double>(3, 4) <<
    f, 0, w / 2, 0,
    0, f, h / 2, 0,
    0, 0, 1, 0);

There are comments on the blog mentioning suggested values of f for 200-250 when using this method.

In the documentation for OpenCV, it is a a little more precise stating that it is in face fx and fy. Focal length can be found if the field of view is known, and vice versa.

fx, fy are the focal lengths expressed in pixel units.

What is the solution here?

Example image of the problem, look at how it is oddly stretched in the x axis. Works fine when they are stretched.

image description

This is another solution that i have seen but it appears to involve more steps that the one above.

Mock Camera Intrinsics

Hello,

I am following this post an amazing blog post to create a Perspective Transform for an arbitrary image.

https://www.blogger.com/comment.g?blogID=7023576929606369407&postID=5089486422033834180https://jepsonsblog.blogspot.co.nz/2012/11/rotation-in-3d-using-opencvs.html

This works well for square images, but has a problem with the aspect ratio when it comes to rectangular images.

I suspect it is the Camera Intrinsics that uses the field of view.

cv::Mat A2 = (cv::Mat_<double>(3, 4) <<
    f, 0, w / 2, 0,
    0, f, h / 2, 0,
    0, 0, 1, 0);

There are comments on the blog mentioning suggested values of f for 200-250 when using this method.

In the documentation for OpenCV, it is a a little more precise stating that it is in face fx and fy. Focal length can be found if the field of view is known, and vice versa.

fx, fy are the focal lengths expressed in pixel units.

What is the solution here?

Example image of the problem, look at how it is oddly stretched in the x axis. Works fine when they are stretched.

image description

This is another solution that i have seen but it appears to involve more steps that the one above.

Mock Camera Intrinsics

Hello,

I am following this post an amazing blog post to create a Perspective Transform for an arbitrary image.

https://jepsonsblog.blogspot.co.nz/2012/11/rotation-in-3d-using-opencvs.html

This works well for square images, but has a problem with the aspect ratio when it comes to rectangular images.

I suspect it is the Camera Intrinsics that uses the field of view.

cv::Mat A2 = (cv::Mat_<double>(3, 4) <<
    f, 0, w / 2, 0,
    0, f, h / 2, 0,
    0, 0, 1, 0);

There are comments on the blog mentioning suggested values of f for 200-250 when using this method.

In the documentation for OpenCV, it is a a little more precise stating that it is in face fx and fy. Focal length can be found if the field of view is known, and vice versa.

fx, fy are the focal lengths expressed in pixel units.

What is the solution here?

Example image of the problem, look at how it is oddly stretched in the x axis. axis which becomes more severe as the rotation increases. Works fine when they are stretched.square images.

image description

This is another solution that i have seen but it appears to involve more steps that the one above.

Mock Camera Intrinsics

Hello,

I am following this post an amazing blog post to create a Perspective Transform for an arbitrary image.

https://jepsonsblog.blogspot.co.nz/2012/11/rotation-in-3d-using-opencvs.html

This works well for square images, but has a problem with the aspect ratio when it comes to rectangular images.

I suspect it is the Camera Intrinsics that uses the field of view.

cv::Mat A2 = (cv::Mat_<double>(3, 4) <<
    f, 0, w / 2, 0,
    0, f, h / 2, 0,
    0, 0, 1, 0);

There are comments on the blog mentioning suggested values of f for 200-250 when using this method.

In the documentation for OpenCV, it is a a little more precise stating that it is in face fact fx and fy. Focal length can be found if the field of view is known, and vice versa.

fx, fy are the focal lengths expressed in pixel units.

What is the solution here?

Example image of the problem, look at how it is oddly stretched in the x axis which becomes more severe as the rotation increases. Works fine when they are square images.

image description

This is another solution that i have seen but it appears to involve more steps that the one above.

Mock Camera Intrinsics

Hello,

I am following this post an amazing blog post to create a Perspective Transform for an arbitrary image.

https://jepsonsblog.blogspot.co.nz/2012/11/rotation-in-3d-using-opencvs.html

This works well for square images, but has a problem with the aspect ratio when it comes to rectangular images.

I suspect it is the Camera Intrinsics that uses the field of view.

cv::Mat A2 = (cv::Mat_<double>(3, 4) <<
    f, 0, w / 2, 0,
    0, f, h / 2, 0,
    0, 0, 1, 0);

There are comments on the blog mentioning suggested values of f for 200-250 when using this method.

In the documentation for OpenCV, it is a little more precise stating that it is in fact fx and fy. Focal length can be found if the field of view is known, and vice versa.

fx, fy are the focal lengths expressed in pixel units.

What is the solution here?

Example image of the problem, look at how it is oddly stretched in the x axis which becomes more severe as the rotation increases. Works fine when they are square images.

image description