|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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???
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Paco schrieb:
> 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.
How about the assumed_gamma and Display_Gamma settings, or the
Gamma_Correct() macro?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
clipka <ano### [at] anonymousorg> wrote:
> Paco schrieb:
> > 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.
>
> How about the assumed_gamma and Display_Gamma settings, or the
> Gamma_Correct() macro?
Thanks for the suggestion. Ideally I'd like to have gamma correction for the
colour image, but disable it for the depth image. I guess I could render them
separately with and without gamma but the above works fine.
It may be worth putting a sentence in the documentation about gamma correction
affecting the depth output in post processing because to me at least this is not
obvious.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |