martin-marek / hdr-plus-swift

📸Night mode on any camera. Based on HDR+.
https://burst.photo
GNU General Public License v3.0
198 stars 9 forks source link

HDR+ Bracketing #11

Closed lapkasasha closed 1 year ago

lapkasasha commented 1 year ago

a couple of years ago google added exposure bracketing to google camera, i would like to see it in your app too if possible

martin-marek commented 1 year ago

Thanks for the suggestion, @lapkasasha. I'm aware of this and agree it would be nice. The issue is that during alignment, all frames need to have the same exposure. So we would need to have a way to adjust each frame's exposure to match the reference frame. I don't know how easy this is – are all pixel intensities linear?

For now, I recommend that you underexpose the whole burst by the same amount (even though this won't give you the same performance).

If you (or anyone else) wants to implement this, I can try to help.

chris-rank commented 1 year ago

I believe that assuming linearity is a very good approximation and should work reasonably well. However, special care has to be taken at the clipping point of the sensor for very bright pixels. My main concern would be that Google uses a very specific bracketing pattern and I think that cameras do not give the user the amount of control to automatically take a burst with such a pattern.

https://ai.googleblog.com/2021/04/hdr-with-bracketing-on-pixel-phones.html

lapkasasha commented 1 year ago

Have you thought about writing your own smartphone application with Rav image capture and your application's algorithms?Or Google will not allow such an application to appear in the play market?I know that's what Google Camera is for, but it's officially only on pixels, people would love to see similar algorithms in their smartphones

вс, 13 нояб. 2022 г., 11:11 Martin Marek @.***>:

Thanks for the suggestion, @lapkasasha https://github.com/lapkasasha. I'm aware of this and agree it would be nice. The issue is that during alignment, all frames need to have the same exposure. So we would need to have a way to adjust each frame's exposure to match the reference frame. I don't know how easy this is – are all pixel intensities linear?

For know, I recommend that you underexpose the whole burst by the same amount (even though this won't give you the same performance).

If you (or anyone else) wants to implement this, I can try to help.

— Reply to this email directly, view it on GitHub https://github.com/martin-marek/hdr-plus-swift/issues/11#issuecomment-1312680541, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK5VPYLMBFT7VHDWLTMUTPTWICWEHANCNFSM6AAAAAAR62MQ3M . You are receiving this because you were mentioned.Message ID: @.***>

martin-marek commented 1 year ago

I don't have any plans for a smartphone app. You could theoretically run my align+merge code on an iPhone (since it's written in Metal), but iPhones already have a better pipeline than this. Porting Burst Photo to Android would require a full rewrite.