# How linear are DSLR sensors?

To be more precise, let's say we are taking a W&B photograph.

Picture 1 : And let's say we take it once with a 1/1000 shutter speed, so that the values for R/G/B range from 0 to MAXVALUE / 2

Picture 2 : And then, we take the same scene, with a 1/500 shutter speed, so that the values range from 0 to MAXVALUE.

Question : will Picture 1, look as Picture 2 once its brightness has been scaled so that the whole dynamic range is filled ?

• Regarding sensor linearity, the considerations about scientific CCD's in this answer could also be of interest. – Alberto Aug 23 '13 at 13:11

Digital sensors are very linear for the vast majority of the response curve, with deviations at the very bottom (due to noise, depending on where the black point is set) and at the very top near saturation. Digital sensors are particularly linear when compared to film, which has a pronounced 'S' shape response curve.

The reason for this is that incoming photons free up electrons in the photodiode generating a charge which is ultimately read out to form the image. The number of freed electrons depends on the number of incident photons hence the linear response to light intensity. However when a photosite is nearing saturation various electrical effects reduce the charge generated by incident photons leading to a roll-off of the response curve (i.e. it becomes shallower). After saturation no further increase in output can be achieved so the curve becomes highly nonlinear.

However it is important to realise that RAW converters, both in software and in camera will probably apply some form of tonecurve to the image to give a more contrasty film-like output.

It is more like an S curve, where the low end is mostly cut off by subtracting the dark current, but it starts saturation before hitting the MAXVAL. In an 8bit image I have sometimes found the true saturation to start around 200 rather than 255.

This is the reason why HDR images is more complicated to make than to sum(Wn*In), where Wn is given by the exposure of In. You first need to calibrate the sensitivity curve.\

Take a look at slide 9.8:

http://www.uio.no/studier/emner/matnat/ifi/INF5440/v10/undervisningsmateriale/F9e.pdf

and response curves here:

http://pages.cs.wisc.edu/~sgallege/P1/index.html