Lecture - Image Processing

3. Basic Methods II: Image operations

3.15. Image Arithmetic III

In this example we can see how useful the application of simple arithmetic operations on scientific image data is. Below there are two photographs of globular cluster M3. These astronomical objects contain variable stars which can alter their visible magnitude within short periods of time. Both images show photographs just a few hours apart. 

Did you know...?
Globular clusters are among the oldest astronomical objects in our galactic neighborhood and are composed of tens of thousands of stars (if not more) in a spherical shape. The Milky Way galaxy itself harbors more than a hundred globular clusters within its outer regions, the so-called halo. The population of stars in these objects differs significantly from stars in the host galaxy, in the sense that their chemical composition features far less elements heavier than hydrogen and helium.

Adding the images results in a brightened version with a seemingly denser center. This effect is produced by adding very bright pixel values (the light gray area between the visible stars) on top of very bright values until the value reaches the maximum and becomes white.

The subtraction of both images (A-B) reveals a far more interesting picture. Like before, we add an artificial offset of 150 to the resulting pixel values. This enables us to see pixels that would have a resulting value of less than 0 with no offset. Information would be lost. These black pixels (black stars) represent a negative difference of both images, i.e. pixels that are brighter in image B compared to image A. In the same way, white pixels (white stars) in the resulting image represent stars that are brighter in image A compared to B. With this simple tool it is possible to pinpoint variable stars between two measurements and associate brightening or fainting with each object.

Similarly, the absolute difference of both images shows all variable objects as white dots, albeit without the information whether the individual object is brightening or fainting. 

Multiplying both images with each other acts like a slight reduction of brightness. Since the multiplication of all pixel values is normalized, the effective pixel values in the multiplication are between 0 and 1 (all values are divided by 255). Multiplying the pixel values results in a even lower value than before, like 0.7 * 0.68 = 0.467. The last step is multiplying the result with 255 to get the actual pixel value. In this example: 178 * 173 -> 119. This reduction of brightness is stronger for pixels of lower value. Therefore, there not only a reduction of brightness in the resulting image, but also slightly higher contrast.

The division of image B by A creates a very bright result. In this example, the images A and B are almost identical, which leads to, or very close to values of 1 (white) when dividing two nearly equal pixel values. The pattern of black squares in the top left corner is due to areas in image B that already have zero intensity. The blocky appearance of the pattern is due to compression artifacts of the image. Compressed images, are (mostly) divided into smaller rectangular parts with an individual brightness value assigned to them. Individual areas that correspond to variable stars can be made out when switching back and forth between the abs difference and the divide button.

Fig 3.16: Globular Cluster M3, two different photographs A (left) and B (right) within a single night, Credit: J.D.Hartman

 


 


Learning Quiz - Image Operations
Go to the following quiz to test what you have learned in this section, or select the quiz from the main course site.
Tutorial - Image Operations
Go to the corresponding tutorial to try some image operations by yourself, or select the tutorial from the main course site.