|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
hello everybody!
i am trying to use povray to generate test images for a camera calibration
algorithm. the documentation suggests that the right and up vectors define
the image plane, while the direction vector gives the distance from the pinhole
to the image plane, ie the focal length. this agrees with the experimental fact
that multiplying right,up and direction by a common factor does not change the
image.
my code looks like this:
camera
{
perspective
//image plane
right x * 0.01
up y/aspectRatio * 0.01
//focal length
direction <0,0,1> * 0.012
location <0,0,-1>
look_at <0,0,0>
}
the calibration target is located at <0,0,0>.
i define one povray unit to be one meter. so i should get an image plane of 10
mm x 7.5 mm and a focal length of 12 mm. the image is rendered at a resolution
of 800 x 600, so an individual pixel should be 0.0125 mm square. feeding all
this into the calibration algorithm i get the following results:
camera location:
Tx = +0.547160, Ty= -1.032746, Tz = +1998.616576 [mm]
camera rotation:
+1.000000 +0.000008 +0.000013
M = -0.000008 +1.000000 +0.000265
-0.000013 -0.000265 +1.000000
focal length:
f = 11.991322 [mm]
basically all is well except the z translation is twice the expected value.
does anyone know where that factor 2 might come from?
thanks
/christoph
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Christoph" <nomail@nomail> wrote:
> hello everybody!
>
> i am trying to use povray to generate test images for a camera calibration
> algorithm. the documentation suggests that the right and up vectors define
> the image plane, while the direction vector gives the distance from the pinhole
> to the image plane, ie the focal length. this agrees with the experimental fact
> that multiplying right,up and direction by a common factor does not change the
> image.
>
> my code looks like this:
>
> camera
> {
> perspective
>
> //image plane
> right x * 0.01
> up y/aspectRatio * 0.01
>
> //focal length
> direction <0,0,1> * 0.012
>
> location <0,0,-1>
> look_at <0,0,0>
> }
>
> the calibration target is located at <0,0,0>.
>
> i define one povray unit to be one meter. so i should get an image plane of 10
> mm x 7.5 mm and a focal length of 12 mm. the image is rendered at a resolution
> of 800 x 600, so an individual pixel should be 0.0125 mm square. feeding all
> this into the calibration algorithm i get the following results:
>
> camera location:
> Tx = +0.547160, Ty= -1.032746, Tz = +1998.616576 [mm]
>
> camera rotation:
> +1.000000 +0.000008 +0.000013
> M = -0.000008 +1.000000 +0.000265
> -0.000013 -0.000265 +1.000000
>
> focal length:
> f = 11.991322 [mm]
>
> basically all is well except the z translation is twice the expected value.
> does anyone know where that factor 2 might come from?
>
> thanks
> /christoph
ok after checking the code 17 times i have to admit it was my mistake,
the calibration target was scaled by 0.5. sorry.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|