letmaik / rawpy

📷 RAW image processing for Python, a wrapper for libraw
https://pypi.python.org/pypi/rawpy
MIT License
587 stars 67 forks source link

Exposure Compensation in rawpy #192

Closed mxz2013 closed 11 months ago

mxz2013 commented 1 year ago

I have a question concerning how to take into account the "Exposure Compensation" in the raw when converting the raw to a JPG image. The use case is when I have a relatively darker raw which was taken as "Exposure Compensation = -2 EV", then even if I put exp_shift = 8 (3 stops lighter), the final JPG still looks darker.

Screenshot 2023-02-16 at 12 22 32

I load the same raw to the darktable and try to get similar results as what rawpy gives, I realize 2 things, first, the darktable can allow me to add 4 EV exposure, and the second thing is it allows me to compensate the camera exposure.

Thus my question is how can I have a JPG with more exposure boosting from rawpy? Is there a way to compensate the camera exposure in rawpy?

Screenshot 2023-02-16 at 12 17 13
letmaik commented 1 year ago

Since rawpy is based on libraw, it might be worth seeing if you can achieve your desired result directly with the dcraw tool. See https://www.libraw.org/download. If not, then it's not something that can be addressed here.

flyhu2 commented 9 months ago

I have a question concerning how to take into account the "Exposure Compensation" in the raw when converting the raw to a JPG image. The use case is when I have a relatively darker raw which was taken as "Exposure Compensation = -2 EV", then even if I put exp_shift = 8 (3 stops lighter), the final JPG still looks darker. Screenshot 2023-02-16 at 12 22 32

I load the same raw to the darktable and try to get similar results as what rawpy gives, I realize 2 things, first, the darktable can allow me to add 4 EV exposure, and the second thing is it allows me to compensate the camera exposure.

Thus my question is how can I have a JPG with more exposure boosting from rawpy? Is there a way to compensate the camera exposure in rawpy?

Screenshot 2023-02-16 at 12 17 13

Hi,have you solved this?I'm also confused about the ‘exposure adjustment’ in Adobe Camera Raw,And I found that apply a simple multiple(such as -1EV),the result is not the simple 1/2 of original raw data,not a linear relationship.

And if I make the original raw data times 1/2 ,and then apply the rawpy‘s postprocess,the rusult‘s color is really casted,I don‘t know why.