For this month’s Geospatial Frequently Asked Question (G-FAQ), I offer a freeware solution to a problem many of you may have encountered when downloading free Landsat and/or ASTER data: you open the file and the imagery is simply a big black tile! You might even ask yourself, “What? Did I download the imagery incorrectly?!”
Well, the answer is a resounding, “Nothing is wrong, you just need to color balance that data!” While I have explored the topic of color balancing in previous G-FAQs (you can read more here, Part 1 and Part 2), the discussion was meant for advanced GIS and remote sensing users who have the funds to purchase software with a price tag over $1,000.
In this G-FAQ, I take a different approach, offering a less technical discussion of the topic with a hands-on movie showing you the steps required to color balance your imagery in a freeware application.
With this in mind, the February G-FAQ will address this set of core questions:
Why is my imagery all black and what do I do to fix it? How are colors made on a computer screen? What is color balancing? What freeware application can color balance?
Colors and Your Computer Screen
Each time you open (or double click) a picture file, such as a JPEG, TIFF or BMP, your computer needs to be told exactly how to create that image onscreen. If you could look at the internal structure of this picture, you would see it is a gridded computer file where each square of the grid, also called a pixel, has a defined color. You can actually see these tiny pixels of color by looking at a monitor from inches away – though I do not recommend doing that for long!
The color of each pixel is determined by mixing varying amounts of ‘digital’ pigments, for instance, the primary colors of red, green and blue. The computer monitors that most majority of us use only accept red, green and blue pigment values in a range from 0 to 255, also known as 8-bit. Here are some examples of how red, green and blue pixel values combine to form colors:
So when you open a picture file, your computer reads the red, green and blue values in each of the pixels; and then sends this information to the monitor which creates the image you see onscreen.
Why is This Satellite Imagery File All Black Then?
If you tried to open a satellite imagery file (or any picture file) by double-clicking on it, and it shows up as a black tile; then your data has 16-bit color values, not the 8-bit color values your computer knows how to read. For example, your imagery file might have a pixel with color values of 800, 345 and 127 (i.e. red, green, blue). But your computer only understands red, green and blue color values when they all fall between 0 and 255. If it finds a pixel with color values outside this range, your computer will not understand how to display the image and you will see a black rectangle.
When this happens, you will need to color balance your imagery. Color balancing is the process of creating a final image with colors that are pleasing to the human eye – i.e. grass is green; sidewalks are white; etc. Without you even knowing it, when you snap a picture with your iPhone, Android or hand-held camera, it automatically color balances the final photo. Satellites and aerial cameras do not automatically color balance imagery – this is something the provider of the imagery can do or you can as well.
As a quick side note, not all satellite imagery is in color. Some of it is black and white only, for instance WorldView-1. This data can also be delivered with 16-bit grey scale values. Unlike a color imagery file with red, green and blue pixel values, each WorldView-1 pixel only has a single grey value which tells the computer how to display the image. A zero grey value is displayed as black, and a 255 grey value is white with 254 shades of grey between these extremes. If you computer finds a grey value outside the 0 to 255 range, then it will display the image in all black. In these cases, you will also need to ‘color’ balance this imagery file.
How do I Color Balance for Free?
The best freeware application I have found to color balance is called Monteverdi. It was created by the French Space Agency (CNES) and is featured in this month’s Free For All. While not the most user-friendly application, Monteverdi is powerful; and after some trial and error, it will let you color balance and then export a portion of this color-balanced file to a variety of formats. Instead of trying to explain this process with words, the movie below will show you: (1) how to color balance imagery with Monteverdi; and (2) export this imagery to a picture file that will not open as a black rectangle. You can download Monteverdi here – one limitation is that this application will only install on Windows-based computers.
Until our next edition of G-FAQ, happy GIS-ing!
Do you have an idea for a future G-FAQ? If so, let me know by email at email@example.com.
Find Out More About This Topic Here
- CNES – The Monteverdi Application
- Spokane Falls Community College – How Computers Make Images
- Wikipedia – Color Balancing
Brock Adam McCarty