timothybrooks / hdr-plus

HDR+ Implementation
MIT License
601 stars 203 forks source link

fix for darkareas missalignment #21

Closed KillerInk closed 6 years ago

KillerInk commented 6 years ago

its simple but effective. you have to add +64 to each input pixel and increase the blacklvl +64. due that its easier for the algo to algin correct in dark areas, no more ghosting and visible tiles.

greets

timothybrooks commented 6 years ago

Hi KillerInk,

Thanks for the recommendation! Could you submit a pull request for this? I would be happy to review and accept the change.

KillerInk commented 6 years ago

Hi Timothy

i try to add it to your code, but its untested.

i only use the align and merge part and do it aot compile. im including that complied lib in another project wich get the data direct from the camera and save it back as stacked dng.

also i think there is something wrong.

https://github.com/timothybrooks/hdr-plus/blob/bbcae37ffcc5cec4d3e7069bcab65b699659e57f/src/align.h#L7-L8

KillerInk commented 6 years ago

i wonder where that factor and the diff through 256 come from https://github.com/timothybrooks/hdr-plus/blob/bbcae37ffcc5cec4d3e7069bcab65b699659e57f/src/merge.cpp#L52

https://github.com/timothybrooks/hdr-plus/blob/bbcae37ffcc5cec4d3e7069bcab65b699659e57f/src/merge.cpp#L58

on the left side of the ledder is a figure wich gets smoothed with factor

orginal frame

orginalframe

with factor factor

factor removed

removedfactor

the factor seems to cause the ghosting in dark areas

DanielMao2015 commented 3 years ago

@KillerInk hi, I am still confused about the effect of fact and the normailziation process. Can you help me?