dmarnerides / hdr-expandnet

Training and inference code for ExpandNet
Other
201 stars 40 forks source link

about hdr image save #19

Closed sunyclj closed 2 years ago

sunyclj commented 2 years ago

In the pre-processing stage, the range of HDR is set at [0,1] by np.interp() after reading HDR, and the same is true when saving HDR image. Won't the information of HDR image be lost in this way?

t2ac32 commented 2 years ago

Not really since .interp()_ will do as many decimals as required to intepret de previous scale. The idea of having [0,1] is to have more decimals to interpret your pixels colors.

When reading your HDR it will be of importance which colorspace are you using to show the images, Since a colorspace with "few" tones will do a bad job interpreting step changes.

dmarnerides commented 2 years ago

Sorry I thought I had answered this but my email response did not get here for some reason. Here it is:

"Not really, as the predictions are of relative luminance, so a linear scaling won't lose information (unless we are comparing across images, e.g. video frames -- which is something that should be considered in the experimental video implementation here).

The output can be rescaled linearly without loss, to match a display or absolute units if we have values for those.

(this of course assumes enough floating point precision which we almost surely have here when using float)"

dmarnerides commented 2 years ago

Not really, as the predictions are of relative luminance, so a linear scaling won't lose information (unless we are comparing across images, e.g. video frames -- which is something that should be considered in the experimental video implementation here).

The output can be rescaled linarly without loss, to match a display or absolute units if we have values for those.

(this of course assumes enough floating point presicion which we almost surely have here when using float)

On Thu, 24 Mar 2022, 05:47 sunyclj, @.***> wrote:

In the pre-processing stage, the range of HDR is set at [0,1] by np.interp() after reading HDR, and the same is true when saving HDR image. Won't the information of HDR image be lost in this way?

— Reply to this email directly, view it on GitHub https://github.com/dmarnerides/hdr-expandnet/issues/19, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2A5HLNMMGH34BFWI23UVLVBP6YNANCNFSM5RQBZPHQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>