Logo elodees  elodees

A caring AI for a better world













Only alphabetic characters accented or not as well as the space are accepted

Logo IA




Adjust exposure of RAW image





No account yet ?

Sign up to access all content




Adjust exposure of RAW image


Tested in Anaconda and Python 3.7

import rawpy
import numpy as np
from matplotlib import pyplot as plt
 
bit_depth = 12
exposure = 5
 
path = "Images/00060_04_0.1s/00060_04_0.1s.ARW"
raw = rawpy.imread(path)
black_level = raw.black_level_per_channel[0] # assume they're all the same
 
im = raw.raw_image
im = np.maximum(im, black_level) - black_level # changed order of computation
im *= 2**exposure
im = im + black_level
im = np.minimum(im, 2**bit_depth - 1)
raw.raw_image[:,:] = im
im = raw.postprocess(use_camera_wb=True, no_auto_bright=True)
 
plt.imshow(im)
plt.axis('off')
plt.title('Image')
plt.show()
 


Source : https://stackoverflow.com/questions/54272236/adjust-exposure-of-raw-image-based-on-ev-value



Nikon image




Raw image processing



The Bayer Grid

Generate pixels from the photosites of a sensor

Light Vs Colors












Welcome, my name is Eric Soupet and I am the administrator of the site elodees.com. elodees.com is a state of the art of Artificial Intelligence and aims to be collaborative, you can now offer content such as articles, events, tutorials, ... so don't hesitate !

Platform images credit : Pixabay - Pixabay License | Pexels - Pexels License