Set advanced projection model in vision sensor.

Typically: "How do I... ", "How can I... " questions
Post Reply
rick187
Posts: 9
Joined: 02 Jul 2014, 08:55

Set advanced projection model in vision sensor.

Post by rick187 »

Hallo,

I would like simulate as best as possible a real camera for which I have all the intrinsic parameters obtained from a calibration, but in the vision sensor it seems that I can only set a "perspective angle" which, I guess, is equivalent to the focal length.
Is there a way to specify more complex projection models?
For example I would need to have different pixel sizes for x and y and non-centered coordinates of the focal axis.
This is very important for simulating a real camera.
Even the possibility to simulate distortion would be very useful.

Thanks.

Riccardo

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: Set advanced projection model in vision sensor.

Post by coppelia »

Hello Riccardo,

you can implement a specific vision sensor filter, via a plugin mechanism. In that way, you can do all the processing you wish inside of your plugin. Have a look at the demo plugin in programming/v_repExtSimpleFilter that exports 2 custom filters.

Cheers

rick187
Posts: 9
Joined: 02 Jul 2014, 08:55

Re: Set advanced projection model in vision sensor.

Post by rick187 »

Hello,

thanks for the reply. I was indeed considering the filter plugin as a possible solution.
However, as far as I understood, in the filter I have, as input, the image already taken by the sensor, while my plugin should operate on the image formation itself.
Assume, for example, that I want to simulate an omnidirectional camera. I think there is no way to do that using a filter since the perspective angle is limited to 135 degrees. Maybe the only solution would be then to have multiple cameras and mix their images somehow, but this seems quite complicated.

Cheers.

R.

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: Set advanced projection model in vision sensor.

Post by coppelia »

Right, in that case you need a different approach. Have a look at the demo model Models/components/sensors/spherical vision sensor.ttm that does exactly that: take a total of 6 vision sensor images and stitch together a single image from that. In that case a different approach was taken, but again via a plugin. The plugin project is located in programming/v_repExtVision.

Cheers

Post Reply