POV-Ray : Newsgroups : povray.advanced-users : Obtaining Depth while using Anti-aliasing : Re: Obtaining Depth while using Anti-aliasing Server Time
22 Jun 2024 22:01:31 EDT (-0400)
  Re: Obtaining Depth while using Anti-aliasing  
From: handos
Date: 10 Jan 2013 06:25:01
Message: <web.50eea45ce780593ad7ae32040@news.povray.org>
Hi Clipka,

Thanks for spending time on this. Registration here means that aligning one
image with the other. For example, if we have pose and depth-map for a given
image (in my case it is I_ref) and given another pose (pose of I_test in this
case) we can project the points given in I_ref frame to I_test pose frame and
pick the texture from the I_ref to obtain an estimate of how I_test would have
looked like and in our case we have the I_test render directly obtained from
POVRay so we can make visual comparison of I_test predicted from 3D points given
in I_ref and I_test given by POVRay. This is a sanity check to assure that
depth-maps and camera poses are correct. Ideally the predicted I_test and POVRay
I_test should have looked same. This is what I mean by registration.
Additionally, I call it forward registration because I am registering I_ref to
I_test.

Another sanity test I did was to align the images other way around, swapping the
role of I_ref and I_test too (because my POVRay gives me depth-map for I_test
and pose too) and this can allow us to reason occlusion. Ideally if there was no
occlusion, points in I_ref registered to I_test should have same correspondence
for points in I_test registered to I_ref back. Black regions are marked out as
occluded points. If you look at the images at
http://www.doc.ic.ac.uk/~ahanda/anti_alias_depth.html the right wall is
completely black which means that there is something wrong because clearly that
wall is visible in both images, so how can it be occluded?

Yes, the depth is raw euclidean distance but I have the codes to convert them to
the real Z-coordinate. They are available here in MATLAB / C++
http://www.doc.ic.ac.uk/~ahanda/HighFrameRateTracking/downloads.html under the
section "Ground Truth Data Parsing (Source Code)"

I have updated the images with red-green channels to them at
http://www.doc.ic.ac.uk/~ahanda/anti_alias_depth.html I have also shown the
depth-maps next to the both images. They seem all OK to me (or maybe not!) but
let me know if there is something wrong with camera matrix?

Thanks,
Ankur.





clipka <ano### [at] anonymousorg> wrote:
> Am 09.01.2013 21:28, schrieb handos:
>
> > The first image (1,1) shows the registration of second image (called I_ref) with
> > the image at the bottom (called I_test). The black areas are marked as pixels
> > where the registration of I_ref with I_test (forward registraion) and
> > registraiton of I_test and I_ref (backwards registration) does not agree - this
> > could be pixels that are occluded etc. But I can't see why the plane at the
> > right is blacked! It shows that there is error in obtaining depth, isn't it? I
> > am wondering if someone will be able to help me fix the depth-map code in
> > tracetask.cpp / tracepixel.cpp files to make sure that I get expected results.
> >
> > Apologies if this is something hard to understand for first time. I can
> > re-explain that!
>
> Please do, as I have no idea what that "registration" thing is you're
> talking about.
>
> Does "That Thing You Are Doing" work if you're not using anti-aliasing?
> Maybe the problem is in "That Thing" rather than in your modified
> version of POV-Ray.
>
> Posting the depth maps associated with the ref & test images might also
> help.
>
> (BTW, is there a specific reason you're limiting yourself to B&W with
> those images? I mean, you could make the non-agreeing regions stand out
> better if you used red, for instance. Or show the ref image in the green
> channel and the test image in the red channel. Fun stuff like that,
> which might help get a clearer picture - literally - of what is
> happening here.)
>
>
> Staring at those images I get a hunch that you're doing something
> fundamentally wrong with "That Thing You Are Doing". From the pictures I
> gather that they are shot in the same direction but with some lateral
> translation of the camera, i.e. there's something going on with a
> parallax; I have a gut feeling that you're not taking that parallax into
> account the way you would need to.
>
> (You /are/ aware that the depth computed during POV-Ray's tracing is
> /not/ some kind of "Z coodinate in camera space", but the raw distance
> to the camera, right?)


Post a reply to this message

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