ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Does anyone know the focal length(mm) of RGB camera?

asked 2015-05-20 21:10:11 -0600

gmir gravatar image

updated 2015-05-25 06:30:28 -0600

Image size is 640*480.

I don't know whether I'm right or not. As the focal length in pixels is 525(default) and the pixel size is 2.8 um, then the focal length is 525*2.8 um = 0.147 cm, which is needed to use my robot model.

I've used this parameter to implement conversion from image coordinate to camera coordinate. But it turns out a big error.

edit retag flag offensive close merge delete

Comments

I could be wrong but to me it seems you are trying to calculate 3D (Camera-) coordinates of a point using it's 2D (Image-) coordinates. That's not possible without the use of a stereo camera or a structure from motion approach.

Malefitz gravatar image Malefitz  ( 2015-05-29 08:14:54 -0600 )edit

It is possible if the real object dimensions are known. cv2.solvePNP provides a simple method for that, see: https://docs.opencv.org/2.4/modules/c...

Oscar Lima gravatar image Oscar Lima  ( 2020-07-09 06:58:20 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-07-09 06:56:26 -0600

This question has been answered here:

https://answers.ros.org/question/1265...

Basically use this formula:

f = (width/2) / tan( deg2rad(hfov)/2)

The following links are also helpful for the topic:

https://docs.opencv.org/2.4/modules/c... https://nl.mathworks.com/help/vision/... http://docs.ros.org/melodic/api/senso... https://wiki.ros.org/image_pipeline/C...

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-05-20 21:10:11 -0600

Seen: 1,398 times

Last updated: Jul 09 '20