Vision Sensor focal length

Typically: "How do I... ", "How can I... " questions
Post Reply
mateo
Posts: 19
Joined: 20 Feb 2013, 16:37

Vision Sensor focal length

Post by mateo »

hi, where can i find the focal length value of a vision sensor in v-rep?
thanks!

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

Re: Vision Sensor focal length

Post by coppelia »

Hello Mateo,

V-REP uses the angle of view of a camera, instead of the focal length. You can calculate one from the other. In V-REP, take the largest from a view's width or height: that corresponds to the angle of view of the camera or vision sensor.

You can modify this in the camera's dialog (Perspective angle), or in the vision sensor's dialog (Perspective angle).

Cheers

mateo
Posts: 19
Joined: 20 Feb 2013, 16:37

Re: Vision Sensor focal length

Post by mateo »

thanks a lot for the exhaustive answer...nevertheless i have a doubt: is it the right formula (the one i should invert): \(\alpha=2 \arctan\left(\frac{d}{2 f}\right)\) ?
in that case i should know \(d\) ...but i don't.. right?
thanks again

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

Re: Vision Sensor focal length

Post by coppelia »

Hello Mateo,

The focal length makes sense only in situations where you have a real projection surface, like a camera film or camera sensor. If you have a real camera with focal length F, then check what the film size / sensor size is for the value of d. Then you can calculate the angle of view and use that in V-REP.

Cheers

mateo
Posts: 19
Joined: 20 Feb 2013, 16:37

Re: Vision Sensor focal length

Post by mateo »

now I understand,
so, if i want to use the usual formula to change reference space, from camera space to image space:

\(U_i=f \frac{X_c}{Z_c}\)

\(V_i=f \frac{Y_c}{Z_c}\)

which \(f\) should i use?
thanks
matteo

kleinash
Posts: 112
Joined: 28 Sep 2014, 09:58

Re: Vision Sensor focal length

Post by kleinash »

Wish there was a way to upvote..

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

Re: Vision Sensor focal length

Post by coppelia »

Hello,

have also a look at this post.

Cheers

Post Reply