Home | Tutorials | Wiki | Issues
Ask Your Question
0

Customize CameraLens function for Wide angle (fish eye) cameras

asked 2016-10-20 08:26:24 -0500

sekaran gravatar image

In class CameraLens(), [r = c1ffun(theta/c2+c3)], I like to define my own mapping function using theta as input for the function (for example - Polynomial Fish Eye Transform). I like to know what is the better way of doing it.

Some important issues are: 1. I cannot access the value of 'theta' and so I could not define anything on my own. 2. I cannot set the value of 'r' for the above mentioned mapping function. 3. I don't have access to the source code of CameraLens() class? If so, then I could implement something on my own.

How the see the implementation of CameraLens() class?

PS: I already checked this tutorial http://gazebosim.org/tutorials?tut=wi... . I dont want to use any standard models like gnomonical, stereographic, equidistant, equisolid_angle, orthographic.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-10-20 17:06:31 -0500

nkoenig gravatar image

Theta is the <horizontal_fov>, and r is the result of the function which means you don't set that value.

According to the tutorial, you can set everything in SDF: http://gazebosim.org/tutorials?tut=wi...

All of our source code is open: https://bitbucket.org/osrf/gazebo

edit flag offensive delete link more

Comments

I already in the tutorial how to use the custom type lens with the same mapping function r = c1ffun(theta/c2+c3). But, I need to change the function itself. In the source code, I see the values for c1, c2, c3 etc are set to the shader. But I cannot really find, where r = c1ffun(theta/c2+c3) is implemented in the source code?

sekaran gravatar imagesekaran ( 2016-10-21 08:23:38 -0500 )edit

Thanks for the reply. I just found its implemented in the shader 'wide_lens_map_vs.glsl'. But <horizontal_fov> is not 'theta' exactly. The value of 'theta' is calculated in the same shader.

sekaran gravatar imagesekaran ( 2016-10-21 09:07:02 -0500 )edit

Hi! I am wondering if someone actually changed the mapping function according to the actual fish eye model used in opencv? if yes, can anyone point me towards the source. If not, can somebody explain me whether this function can be related with that model and produce the same results, in that case I am looking forward to some mathematical explanation particularly used in this mapping function instead of the opencv one.

owais2k12 gravatar imageowais2k12 ( 2018-07-24 01:05:52 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-10-20 08:00:52 -0500

Seen: 324 times

Last updated: Oct 20 '16