Invert (image processing)

from Wikipedia, the free encyclopedia

In image processing , inverting is a process for "reversing colors ". In concrete terms, this means that the "opposite color" of the respective color space is determined. For example, black becomes white and vice versa. An image inverted in this way looks similar to a color or black and white negative on analog film material, but does not correspond to one. The inversion of an inverted image leads back to the original state (pseudo-negative → positive → pseudo-negative etc.). The inversion is one of the pixel operations and is applied individually to each pixel regardless of its neighbors.

Inversion in the RGB color space

In the RGB color space , the inverted value is determined by subtracting the color value at a pixel from the maximum value.

However, this common method of inverting an image is not the nature of negative film material . It cannot correctly convert a scanned color or black and white negative into a positive image. The procedure used in the method for inverting, subtracting the value to be inverted from the maximum value, would require that the intensity values ​​were additive. In truth, however, it is not the intensities but the density values ​​that are additive for photographic material . The addition and subtraction of density values ​​corresponds to the multiplication and division of intensities. Therefore, instead of subtraction, there should be a division. This results in an extreme relationship between the intensity values ​​in the negative and the intensity values ​​in the positive. In order to reverse a negative correctly, a color depth greater than 8 bits is required, as otherwise a sufficient number of discrete values ​​cannot be calculated in the context of the reversal.

Examples

Arithmetically

A pixel has the color values ​​red = 55, green = 128 and blue = 233 in a color resolution of 0-255 (corresponds to 8 bit color depth ).

The inverted values ​​would be

Rot = 255 - 55  = 200
Gruen = 255 - 128 = 127 
Blau  = 255 - 233 = 22

Individual evidence

  1. David Dunthorn: Negative to Positive (PDF; 302 kB) 2004.