POV-Ray : Newsgroups : povray.advanced-users : Obtaining Depth while using Anti-aliasing : Re: Obtaining Depth while using Anti-aliasing Server Time
31 May 2024 23:34:02 EDT (-0400)
  Re: Obtaining Depth while using Anti-aliasing  
From: handos
Date: 12 Jan 2013 11:05:02
Message: <web.50f1889be780593ad7ae32040@news.povray.org>
Hi Clipka,

I am giving camera parameters for both images. I have the rotation matrices now
with only diagonal elements non-zero to avoid any confusion with flipping etc.
My first camera parameters [R1 T1] corresponding to I_ref are:

cam_pos      = [-0.892, 1.3, 2.814]';
cam_dir      = [0, 0, -1]';
cam_up       = [0, 1, 0]';
cam_lookat   = [0.108, 1.3, -1.779]';
cam_sky      = [0, 1, 0]';
cam_right    = [-1.33, 0, 0]';
cam_fpoint   = [0, 0, 1]';
cam_angle    = 90;

R1 =

    -1     0     0
     0     1     0
     0     0    -1
T1 =
   -0.8920
    1.3000
    2.8140

and the parameters of the second camera (this corresponds to I_test) are:
cam_pos      = [-0.712, 1.3, 2.814]';
cam_dir      = [0, 0, -1]';
cam_up       = [0, 1, 0]';
cam_lookat   = [0.108, 1.3, -1.779]';
cam_sky      = [0, 1, 0]';
cam_right    = [-1.33, 0, 0]';
cam_fpoint   = [0, 0, 1]';
cam_angle    = 90;

R2 =

    -1     0     0
     0     1     0
     0     0    -1

T2 =
   -0.7120
    1.3000
    2.8140


I_ref and I_test correspond to images red and green respectively here in this
web-page http://www.doc.ic.ac.uk/~ahanda/anti_alias_depth.html .

Another thing I'd like to mention is that this scene is made of meshes
(converting the obj file made in wings3D to povray codes via PoseRay. This is
Jaime's Living room scene rendered via texture baking in POVRay). Do you think
it could be an issue? I am not sure but I wanted to mention that in case that
springs something.

I tried inverting the z direction (direction -z in povray code) but I observed
same thing. I can't quite figure out why the depth values that are parallel to
the optical axis seem to register images properly than the ones that are Y axis.
I'm surprised even that the ceiling is aligned.

Thank you very much for your time.

Kind Regards,
Ankur.


clipka <ano### [at] anonymousorg> wrote:
> Am 11.01.2013 12:04, schrieb handos:
>
> > Great! Thanks for letting me know that the anti-aliasing depth thing is fine. So
> > it is now back to the recovering camera parameters i.e. the Rotation and
> > Translation of the camera with respect to the world frame of reference.
>
> You've given only one set of camera parameters, but you have two images
> - can you also post the other set of camera parameters? (Please make
> sure to identify which is which.)
>
> The camera translation T looks perfectly fine. I'm not so sure about the
> rotation matrix R: It may or may not need flipping about the diagonal,
> depending on whether you consider position vectors to be 1x3 or 3x1
> matrices. (Classic vector arithmetics typically uses the former
> convention, while computer graphics often uses the latter one.)
>
> Another thing to beware is that POV-Ray by default uses a left-handed
> coordinate system. Did you account for that?
>
> You can force POV-Ray to use a right-handed coordinate system by
> specifying the camera as
>
> camera {
>    right      x*ASPECT_RATIO
>    up         y
>    direction -z
>    location <...>
>    look_at <...>
>    angle ...
>    ...
> }


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.