Next: Quantization
Up: Image
Previous: Image Representation
- Gamma Correction
- Compensate Display Non-linearities
- (sometimes built-in)
- Gamut Mapping
- Map to Displayable Colors
- Color Clipping or Color Compression
void cmap_gamma(CMap *m, Real gamval)
{
int k;
for (k = 0; k < 256; k++) {
m->r[k] = 255 * pow(m->r[k]/255., 1./gamval);
m->g[k] = 255 * pow(m->g[k]/255., 1./gamval);
m->b[k] = 255 * pow(m->b[k]/255., 1./gamval);
}
}
Luiz Velho
Wed Apr 7 12:17:01 "EST 1999