Convert to grayscale

From RS Wiki
Revision as of 18:29, 19 June 2011 by Rac (Talk | contribs) (Conversion algorithms)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Grayscale vs. Color

A grayscale image is an image that carries only intensity information. such an image, also known as black-and-white, is composed exclusively of shades of gray, varying from black (weakest intensity) to white (strongest intensity).

A photograph is bearing a message to the viewer. This is why black and white photography will always have an extraordinary appeal. Its message is easier to transport, not being disturbed by other color impressions. Think about a wedding dress - doesn't look best in a black and white photo?

Nowadays you almost always shoot in color and convert your images after that to black and white. This is where a good conversion software comes into discussion.

Conversion algorithms

A grayscale conversion algorithm tries to obtain a black and white image out of a color image. In the process, all pixels are treated equally, no matter their position or spacial significance. The only significant attribute is the color of the pixel. Since most images are taken/stored in Red, Green, Blue the algorithms found in the literature are focused on this representation.

Mathematically it is a function of color information (theoretically position in the image could be also used) that outputs a single value, the grayscale pixel value.

The following methods can be used to convert a color value to black and white:

  • average - simply averages the values: (R + G + B) / 3.
  • min - simply takes the minimum of the values: min(R + G + B).
  • min - simply takes the maximum of the values: max(R + G + B).
  • luminosity - forms a weighted average to account for human perception. The receptors inside the human eye are more sensitive to green than other colors, so green is weighted most heavily. The formula is 0.21 R + 0.71 G + 0.07 B.
  • lightness - averages the most prominent and least prominent colors: (max(R, G, B) + min(R, G, B)) / 2.
  • RGB channel - uses only one of the 3 color channels.

How to convert to grayscale

You can convert to grayscale using an image editor or an image converter. Image editors like GIMP or Photoshop are optimized for working on one single photograph, while image converters like AZImage process batch of files at once.

To convert multiple images at once to grayscale using AZImage, start AZImage and follow the next steps:

  • select your images
    • open Windows Explorer (for example by pressing the windows key + E).
    • go to the folder where your images are.
    • select your images (select multiple images by keeping the Ctrl key pressed while clicking them).
    • drag your images with the mouse on the AZImage window. They will be added to the list and in the status bar the count of all added images will be displayed.

Alternatively you can click on "Add file..." on the AZImage toolbar and select your files in the subsequent dialogue.

  • define a conversion format
    • click on the "Select Format" tab
    • uncheck all other formats to deactivate them
    • click on "Add..."
    • click "Optimum Size" and "Accept & Close". Additionally you can also change the output folder or the output format.
  • setup the conversion to grayscale in image processing form
    • click on the newly added format (last in the list) to select it
    • click on "Processing" in the toolbar.
    • click on "Grayscale", check the "Enabled" combobox and select the desired Algorithm. We recommend Luminance for most of the cases. A small preview is displayed instantly in the "Preview 1" area. To quickly compare two algorithms, click on "Preview 2" area (its caption changes to bold, while the "Preview 1" changes back to normal text) and select the second algorithm.
    • Click on "Accept"
  • start the conversion
    • Click on the "Convert!" tab
    • Click on "Start"

Your converted files are now saved in the specified folder. Click on the "Floder ..." button at the right of the status area to open the folder and view the files.

How to contribute to this article

Do you have questions? Use the discussion page of this article to post them.

Do you have improvements? Please feel free to improve the article in any way (from minor spelling issues to restructuring). This is what wiki is for!