1. posterization
any 'histgram stretch' may produce posterization because the limited levels has to fill a broader range than origin. Some empty bins will be created. mostly the posterization happens in gradual color region, sky e.g.
2. exposure compensation
even after captured, the exposure of raw data (before gamma correction) can be
adjusted slightly! but how?
3. something about exposure in camera
each camera has a default 'middle gray' ( it has a definition in printing document but the
producers just ignore it). the EC in-camera tries to control some parameters to adjust
the light of object to 'middle gray'. Then if the camera is focused on a the most light
region in one scene, it produces a underexposure photo. Otherwise if the camera is
focused on the most dark region in one scene, it produce a overexposure photo. it is
best to make it focus on a region which stands for the scene illumination. finally which
region to focus on is an option in camera called metering option.
one tip: all camera now only meter the reflecting light but the incident light( incident light
is light directly from one light source, sun, light. for example)
4.the flowchart
a) transform bayer matrix to three-channel matrix without changing depth
raw data interpolation
A demosaicing algorithm is a digital image process used to reconstruct a full color
image from the incomplete color samples output from an image sensor overlaid with
a color filter array (CFA). Also known as CFA interpolation or color reconstruction,
another common spelling is demosaicking.
b) white balance (no depth change)
convert three-channel matrix to RGB matrix by definite what is white color
c) color model convert
if necessary, you can convert pixel matrix from RGB to other color space, .e.g YCbCr
d) gamma correction
adjust contrast according to human vision
e) remove disturbed color,
sharp the edge, noise removal,
f)
color depth change
convert the depth into lower one for display.