Monday 10 October 2011

Exercise: Sensor linear capture

This was an interesting exercise to see how light that falls on the camera's sensor is processed within the camera. Light is treated linear for the camera's sensor and most of the captured light is towards the the left of a histogram in the dark areas. To compensate for this the camera applies a gamma correction to boost the highlights and mid tones, effectively shifting the histogram to the right. This gives an image which is close to what the human eye would have seen.

Here is the original with a copy of the histogram.



The following curve was applied to this image to bring it back to what it would have looked like before the camera applied its gamma correction.


This has made the image a lot darker with the histogram bunched up to the left.




The key part to note here is that the majority of the available levels above in the histogram are used in the brighter part of the image, this part of the histogram that is in the right half. This means that there is less available for the darker tones to work with that are all scrunched up on the left, this leads to lesser sampling which will introduce artificial effects such as noise.

By applying the following curve we are emulating the processing of the camera to the linear image. This has restored the image to something near the original, but during the process has introduced additional noise in the areas that it has boosted, notably the shadows.





Although these changes were made with a 16 bit resolution an interesting point to note that is not mentioned in the notes is that the number of samples on the left (shadows) is now significantly reduced, and will therefore inherently introduce unwanted effects.

No comments:

Post a Comment