[Radiance-general] 3d Depth of a pixel

Brajesh Lal brajeshlal at yahoo.com
Fri Mar 18 03:45:45 PDT 2011


Thanks Greg,

This worked for me

    rpict -x 640 -y 480 -z  depth.zbf  -vf  camera.vp  scene.oct > scene.hdr
    pvalue -r -h -df -b +y 480 +x 640 < scene.hdr depth.zbf > depth.hdr

I am able get the depth image after flip.

but when i tried falsecolor
i get error
bash:/opt/radiance/bin/falsecolor: /bin/csh: bad interpreter: Permission denied
 Best Regards,     Brajesh Lal




________________________________
From: Greg Ward <gregoryjward at gmail.com>
To: Radiance general discussion <radiance-general at radiance-online.org>
Sent: Thu, March 17, 2011 4:40:42 PM
Subject: Re: [Radiance-general] 3d Depth of a pixel

Hi Brajesh,

Lars is right that you can use vwrays with rtrace to get more flexible output.  
The Z-buffer file is a string of binary floats, and not formatted as such.  You 
need to pass it through pvalue if you want to produce a (grayscale) image.  You 
can use the following sequence if you like:

    rpict -x ResX -y ResY -z  depth.zbf  -vf  camera.vp  scene.oct > scene.hdr
    pvalue -r -h -df -b `getinfo -d < scene.hdr` depth.zbf > depth.hdr

Notice the back-quotes above, which substitute the resolution output of getinfo 
-d on the command line.  You can then view "depth.hdr" as a grayscale image or 
convert to color using falsecolor:

    falsecolor -l Depth -s auto -m 1 -i depth.hdr > depth_fc.hdr

If you don't want the grayscale image at all, you can combine your pvalue and 
falsecolor commands like so:

    pvalue -r -h -df -b `getinfo -d < scene.hdr` depth.zbf | falsecolor -l Depth 
-s auto -m 1 > depth_fc.hdr

Best,
-Greg

> From: Brajesh Lal <brajeshlal at yahoo.com>
> Date: March 17, 2011 4:33:10 AM PDT
> 
> Hi, 
> 
> I need to know the z depth of  each 3d point. I want an output image such that 
>color of each pixel stores the info of z-depth of the corresponding pixel . 
>
> in rpict i am confused in syntax. How do i use -z option ?
> 
> e.g.
> rpict -x ResX -y ResY -z  depth.hdr  -vf  camera.vp  scene.oct > scene.hdr    
>????
> 
>  
> Best Regards, 
> Brajesh Lal

_______________________________________________
Radiance-general mailing list
Radiance-general at radiance-online.org
http://www.radiance-online.org/mailman/listinfo/radiance-general



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.radiance-online.org/pipermail/radiance-general/attachments/20110318/a97d6096/attachment.html>


More information about the Radiance-general mailing list