Contrast Enhancement for subjects under Flash
You can perform tone mapping on the source image and then convert the result to 8 bits.

Global tone mapping

Depends just on pixel values, i.e.

H[x,y] = G(I[x,y])


The output image pixel H[x,y] is just processed input pixel value using tone mapping operator G. This allows making lookup table holding all possible values (i.e. 0 - 1023 in 10-bit images).

Local tone mapping

Works on pixel values and their neighborhood, i.e.

H[x,y] = G(I, x, y)


These operators are more complex in nature, but yield more details in the resulting image.

Conversion

After applying tone mapping, the image can be converted to 8-bits easily:

O[x,y] = H[x,y] &gt;&gt; 2


Where (>> 2) is shift by two bits, or division by 4.

The conversion can be incorporated in tone mapping step, for example and entry for the look-up table in global tone mapping can be defined this way:

g[i] = (log2(i + 1) * 102.3) &gt;&gt; 1


Note that the operator is a log curve adjusted for range of input values to 0-1023. The operator also contains conversion to 8-bits.

Samples

More info on Wikipedia