Hi Ilia,
First you apply the a/b/c polynomial correction. You should see this as
just a preprocessing step, independent of the actual lens projection.
r_src is the distance from the image center, scaled to half the short
side. Apply the polynomial in inverse, to get r_dest. Convert back to xy
coordinates in the original image scale.
Next calculate R which is the distance of a pixel from the optical
center, in millimeters. In other words, divide by the pixel density
(pixels per millimeters).
The fisheye projection formula will give you theta from R and the focal
length.
Also calculate the polar angle phi=atan2(y,x) in the original 2d image.
Now, phi and theta are the angles of the light ray in 3d space, you can
convert this pair to a 3d coordinate on the surface of the unit sphere.
On 02/08/2021 13:45, Ilia Shipachev wrote:
> Dear Erik,
>
> I'm sorry, I made a mistake. Fisheye factor equals 0.
> Than it's why it becomes complicated for me. With fisheye factor 0 I
> understand that 3D point (X, Y, Z) will be projected through atan(r(X/Z,
> Y/Z)) this will give an angle *theta*. After this angle *theta *will be
> distorted into *theta_d*, and the point will be normalized from *p* ->
> *p* * *theta_d* / *r*, after focal length and optical center shifts will
> be applied. All those steps are clear to me. As well as their reverse
> order when we need to do undistortion.
> But! Does this *theta *get normalized to something different? I've
> noticed that it normalized somehow to map radius angle equals 1 in 3D
> into *r0 *in pixels*(*which is the half of the shortest side). This
> normalization to *theta* can be done before taking atan from 3D point or
> --
> You received this message because you are subscribed to the Google
> Groups "PTGui Support" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
ptgui+un...@googlegroups.com
> <mailto:
ptgui+un...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/ptgui/eaa80e27-b7f8-4183-b665-daa2d538c61cn%40googlegroups.com
> <
https://groups.google.com/d/msgid/ptgui/eaa80e27-b7f8-4183-b665-daa2d538c61cn%40googlegroups.com?utm_medium=email&utm_source=footer>.