|
 |
"Paco" <nomail@nomail> wrote:
> I've been trying to get depth information from a scene using both the raw
> f_output_depth feature as well as the PP_Depth macro. Here are some of the
> samples:
>
> Actual depth pixel value
> 25 35
> 50 53
> 100 72
> 150 88
>
> This is based on using a depth range of 0->1500
>
> This is obviously non-linear - but not referenced anywhere in the documentation
> and I can't find it via google. Does anyone know how the conversion from the
> actual distance from the camera to the object is converted into a value in
> f_output_depth???
After many, many hours of pouring through the source code for both POV and
megaPOV I found it - bloody gamma correction. Don't know if it's a bug but it
would be nice to turn it off in post-processing somehow.
x' = 255* (x/max)^ (1/gamma)
assuming that min_dist=0.
You can pre-correct for it by using something like:
post_process {
function { pow(f_output_depth(x,y)/depth_max_disp,2.2) }
function { pow(f_output_depth(x,y)/depth_max_disp,2.2) }
function { pow(f_output_depth(x,y)/depth_max_disp,2.2) }
function { 1 }
save_file "depth.bmp"
}
Post a reply to this message
|
 |