From Image to Data

How we turn a pretty picture into important information

A land cover classification is one of the most valuable sources of spatial data out there and can be used to answer questions ranging from what, to where, to how big, and how much. If you have ever wondered where a land cover map comes from, or what goes into making a land cover classification, hold onto your hats and take this tour from image to land cover.

They say every picture tells a story. Well, we would argue every picture tells more than a story ... use the swipe tool above to transform the satellite image on the left into a land cover classification. If only it were that easy to do in real life! So how do we turn an image into invaluable data? Read on!


All the Colours of the Rainbow

Before we get into the nitty-gritty, it is important to understand a few basic principles of remote sensing. When the sun shines down on Earth, light travels through the atmosphere and eventually hits a feature on the Earth's surface, like a leaf or a roof. If we think about this light as energy, when this energy hits a target, it interacts with the target and some of the energy is absorbed and some of it is reflected back. The energy that is reflected back can be detected, measured, and recorded by sensors that are onboard a satellite.

Since light energy is radiation, we can consider that energy as a segment of the full electromagnetic (EM) spectrum, which measures the energy and speed of radiation in wavelengths. The EM spectrum describes all types of energy, ranging from low energy, long wavelength radio waves to high energy, short wavelength gamma rays. However, for our purposes, we are mostly interested in visible light (the part of the spectrum that our eyes can detect), which covers the range of wavelengths from roughly 380 to 700 nanometers (nm) . The colours of the rainbow (remember ROYGBIV?) correspond to particular wavelengths across the range with red at the long end (~700 nm) and violet at the short end.

What's important (and pretty neat), is that when light hits an object, the amount of energy that is absorbed and reflected by the object differs depending on the specific wavelength. For example, vegetation absorbs light energy at the violet/blue and red ends of the spectrum, so green light is reflected back. Different types of objects absorb and reflect energy across the visible spectrum differently, which gives unique profiles or signatures of absorption and reflectance across the spectrum. It is these unique signatures that help us to classify the features in an image. Using satellites (our remote sensors), we can detect and collect data on the amount of energy that is reflected at each wavelength by different features on Earth, and this information can be analyzed and used to assign the features in an image to different classes in a map.

Features on the Earth's surface each absorb and reflect energy differently across the spectrum. By using satellites to capture the information at specific wavelengths, we can then classify features in the image.

The Devil is in the Details...

Back to the task at hand! There are a number of steps in making a land cover classification, but the first step is to decide what features we need to classify and how much detail we need in our classification. An important thing to consider here is:

What will the land cover be used for, and who will be using it?

Defining the list of land cover classes you need sets the stage for a number of decision points down the line, and keeping the list as simple as possible will make creating the classification a lot easier. For example, do you just need to map the trees, or do you need to map different types (coniferous versus deciduous) or even species of trees? In general, the greater the number of classes desired, the more information and higher spectral resolution the imagery will need be to in order to identify and tease features apart.

Comparing spectral resolution - the image on the left has five bands, each of which corresponds to a slice of the EM spectrum, while the image on the right has thousands of narrow bands which gives more information and a more complete spectral signature for every pixel. Image courtesy of Edmund Optics.

Put simply, spectral resolution describes how many bands or slices of information an image has and which wavelengths are associated with each slice. The more and narrower the bands in the image, the more information you have to help classify different features (in theory...). As well, because features absorb and reflect differently depending on the wavelength, we want to make sure we have bands that are associated with wavelengths where our features of interest are absorbing and reflecting light differently.

For example, if you scroll up and look back at the Spectral Signal graph above, you'll notice that broadleaf and needleleaf vegetation have nearly identical profiles, except at the higher wavelengths. So, if you want to separate these two types of vegetation and classify them into distinct classes, you will need imagery that contains bands at the higher wavelengths where these classes are different. Otherwise, there will be no way to separate out these two classes in the image.

The two images above differ in spectral resolution - the black and white image on the left is capturing information across one broad channel, while the image on the left is capturing information for three narrower channels (blue, green, and red wavelengths). While we can pick out features somewhat from the black and white image, specific features are much easier to distinguish in the multi-band image on the right because information on each feature is being captured at three different "slices" of the EM spectrum.

Another decision is how much detail or resolution you need in your land cover. Commonly referred to as the minimum mapping unit (MMU), this defines the size of the smallest feature in your land cover. For example, do you need every single tree mapped, or are you just looking to generally understand where groups or clumps of trees are located? Different satellites capture different amounts of detail - we call this the spatial resolution of the image. High spatial resolution imagery captures smaller features and has finer detail, while lower spatial resolution imagery is coarser and fuzzier on the details. Neither is better or worse - in fact, coarser imagery can be better for some things since it takes less time to process, and sometimes, too much detail can cause problems!

Image courtesy of ESRI

Since images are stored as a collection of square pixels or cells, the size of an individual pixel is usually used to describe the spatial resolution. Choosing the best pixel size for creating a land cover is a balance of what level of detail you are interested in, and what the classification will be used for. If you are measuring proportions of land cover classes across a very large area (think hundreds of square kilometers), then superfine detail isn't necessary. However, if you are mapping out a small parcel of land next to a lake and need to know the location of every tree, then you would want imagery that can resolve a very fine level of detail. Cost comes into play here too - generally, the higher the resolution, the more expensive the imagery is to obtain.

Imagery at different spatial resolutions - higher (30 cm pixels!) on the left and lower (30 m pixels) on the right. The imagery in the middle (6 m pixels) likely has enough detail for us at the scale we are interested in for this story. We can generally discern the boundaries of buildings, roads, open water, trees, agriculture, wetlands, and bare ground quite well.


Getting Picky...

Making our list of classes and deciding what spectral and spatial resolution we need from our imagery are critical steps in creating a classification, but there are additional things we need to think about before we create our land cover. Satellites are snapping images of the Earth on a recurring basis, so we have to pick a single image from a single point in time that not only covers the area we are interested in, but also meets some other important time and quality criteria.

The two scenes above were captured at different dates - the top image is from May and the bottom image is from July. What do you notice? Which features pop out better in May versus July?

When? A number of decisions go into picking an image to classify. You've probably noticed that images from different times of year look different, and accordingly, the features we are interested in classifying reflect differently throughout the year. For example, in early spring, deciduous trees don't have their green leaves yet, and other vegetation may still need to grow. In the summer, most vegetation is some shade of green, which can make it hard to tell different types of vegetation apart. In the fall, deciduous leaves start to change colour, coniferous trees stay green, and other types of vegetation die off and turn brown. Because of this, we have to be strategic and pick an image with high contrast between features so that we have the best chance of extracting the classes we are interested in.

Satellites are high up there! So, things like clouds can really affect the quality of an image with respect to creating a classification.

Quality. Selecting imagery also involves assessing the quality of the image. Because the image is captured from Earth's orbit, everything going on in the space between the satellite and the ground can hinder or interfere with the information that the satellite sensor is capturing. For example, clouds don't just obscure what's directly underneath them, but they also create large shadows that shade and/or discolour the features underneath and prevent us from classifying an area. Because of this, we try to pick images with little to no cloud cover, and also with no atmospheric haze or smoke. We also try to pick images from a time of day when the sun is directly (or nearly directly) overhead, which prevents shadows and other illumination issues.


"Hey! Wait a minute! Why can't you just use Google Maps or Google Earth Imagery?"

We have our satellite image! Now what?

We've picked our image - it's a SPOT 7 satellite image, which has four bands: blue, green, red, and near infrared (our spectral resolution) and a 6 m pixel size (our spatial resolution). This combination of bands and pixel size should provide enough information to classify the features we are interested in.

The SPOT 7 satellite orbits the earth at a height of 694 km, which allows it to capture swaths of imagery 60 km wide. It takes this satellite about 99 minutes to circle the Earth, which means it captures imagery for the entire planet every 26 days! You can learn more about the SPOT satellites  here .


What Information is in Our Image?

Our SPOT image has four bands of information. The first three bands (Blue, Green, and Red) shown in the images below are pretty typical. These are the same ones that make up a colour photograph. The fourth band is a band in the near infrared portion of the EM spectrum and is capturing a wavelength range that lies just outside of the visible spectrum (0.76-0.89 um). If you recall from the Spectral Signature graph we looked at earlier, bands at this end of the spectrum are very helpful in differentiating between vegetated and non-vegetated areas, as well as differentiating between different types of vegetation.

The four image bands captured by the SPOT 7 satellite: Blue (top left), Green (top right), Red (bottom left), and Near Infrared (bottom right). Do you notice the differences in the Near Infrared image?


A Little Help From My Friends...

The spectral information from an image is helpful in differentiating our land cover classes, but unfortunately, sometimes just the spectral information isn't enough! If you look at our SPOT image below, you'll notice a lot of different things are green... this can make it hard to separate out and classify things accurately. So, we draw on other types of spatial information and our knowledge about where we expect different land cover classes to exist on the landscape to help tease things apart. For example, topographic information is really handy - we know that wetlands are typically in low-lying areas or depressions, so a layer that tells us where low-lying areas are can be helpful in accurately mapping wetlands. Explore the slideshow below to learn about some other helpful data layers used in classifications.


The combination of imagery information layers that are used in a classification can be thought of as a kind of recipe - you select the type and number of layers that will provide enough information to differentiate the classes you're trying to classify. Too few layers and there may not be enough information to correctly identify features; too many layers may end up providing too much or irrelevant information, which may confuse the classification algorithm. Creating this recipe can involve some trial and error, and in some cases you may never have all the perfect ingredients, but with a bit of skill and luck, the recipe you use will create reasonable results. When all the information layers have been selected and prepared, they are stacked together into an information sandwich or layer cake. Then, we need to decide how we're going to classify the features in our image...


The Classifier

There are two main methods to classifying an image - unsupervised and supervised classification. In an unsupervised classification, remote sensing software applies a clustering algorithm to the image stack and generates clusters of pixels based on similar values. These clusters of similar values become the "unnamed" classes. Next, the analyst interprets what these unnamed classes are representing in the image and manually assigns class names to each cluster. Unsupervised classification can work well when you have a few classes that are well-defined and spectrally distinct in your image.

In a supervised classification, the analyst tells the remote sensing software what the classes are ahead of time by providing "training samples" for each class. The analyst selects representative training samples for all classes from the image, and then the image stack values for each sample are extracted. This information is used to create a statistical profile or signature for each class, which is then applied to a classification algorithm that creates a model to assign a class name to each of the pixels in the image. When training data is picked appropriately and accurately, supervised classifications tend to have higher accuracy compared to unsupervised classifications. The supervised approach also tends to give the analyst a little bit more control over how the classification turns out. The rest of the steps below are based on following a supervised approach.


Getting Picky... Again!

As was mentioned above, training data is the key to a supervised classification. The goal is to pick samples that are representative of the land cover classes you are trying to classify. This may sound simple and straightforward, but it can take years for an analyst to be able to correctly identify and pick out the different land cover classes in an image. Humans use a variety of types of information to help figure out what things are in an image - tone, texture, shape, size, pattern, and context/association all provide clues to what things are in the image. Picking enough samples can take time, especially for rare or tricky to identify classes. Explore the map below to see what some typical training data points look like, and then scroll around and see if you can find other potential training data points.

Collecting "training data" involves finding examples of each land cover class in the imagery. These points are then used to create a predictive statistical model that classifies all of the image into the different land cover classes we have chosen.


The Classification Model

Once we've selected all of our training data, we need to turn all of the image information associated with the training data points into a statistical model. This model will then predict class names across the entire image. There is an intimidating number of different methods and statistical models to choose from here, but one of the most common, flexible, and easy to use is random forests. The random forest algorithm operates by repeatedly selecting random subsets from the training data, creating decision trees and predictions based on the subsets, and then selects the best solution (model) based on majority rule. This model can then be applied across the entire image to predict the most likely class for each pixel.

In the random forest approach, subsets of the training data are repeatedly sampled (100s of times!) and then a model is chosen that reflects what the majority of the different models predicted. This model is then applied to the entire image to give the classified image.


The Result

We did it! We turned our satellite image into a classification! At this point, many people call it a day and consider the work done, but there are a couple of important post-classification steps that should be completed: manual review and editing to fix any obvious or substantial errors, and completing an accuracy assessment. These two steps can turn an okay land cover map into an invaluable work of art and information.

Manual editing is performed by skilled photointerpreters who edit the class names of misclassified features and edit boundaries where necessary. It's important to acknowledge that it would be impossible to clean up everything, so this editing phase is meant to clean up the obvious and major or systematic errors in the classified image. For example, coniferous forest and open water may be confused because they are both very dark - an analyst would look for obvious locations where this mix up is happening and fix the errors accordingly. Depending on what the classification is being used for, some classes may be more important to clean up then others, so in that case, the effort would be focused on the classes of interest.

Once the clean up is complete, it is important to independently assess the accuracy of the classification. The independent part is very important here - ideally, one wants to assess accuracy using data or samples that weren't used in the classification. Otherwise, you're biasing the accuracy assessment of your classification in your favour! It's kind of like asking your mom or partner how the cake you made tasted - there's a good chance they're going to tell you it tasted better then it actually did ...

In a formal accuracy assessment, independent samples of all the classes are checked against what they are called in the classified image, and then a confusion matrix and an overall accuracy score is used to report the results. The overall accuracy is a single percent score that basically reports the number of wrong predictions over the total number of samples. In remote sensing, 85% or higher is a pretty awesome overall accuracy for a classification. The confusion matrix shows the accuracy for each class, and also shows what classes were mixed up or "confused" with each other. Typically, some classes perform much better than others - water for example is a lot easier to classify than a wetland, so the class accuracy for water is often quite a bit higher than for wetlands. Importantly, the confusion matrix can provide valuable information about where the errors in the classification are, so that the data user can evaluate the reliability of the information derived from the classification.

Example confusion matrix! Overall, this classification was 81% accurate in correctly predicting dogs, rabbits, and cats. The individual class accuracies help us to see which classes are confused with each other and where we can expect errors. For example, if we look at the cats, all of the cat reference samples that we tested against the classified cats were cats! That's pretty good and gives us a Producer's Accuracy of 100%. However, for a dog and a rabbit reference sample, the classification erroneously called these cats, which gives the User's Accuracy of 71%. This means that while the classifier was quite good at correctly calling actual cats cats, it also called some things that weren't cats cats. Therefore, a User of the classification can expect that more things are probably predicted to be cats than are actually cats. Confused yet?


The North Saskatchewan and Battle River Watersheds Land Cover

Well, that's it a nutshell. Now that it's finished, the classification can be used to figure out where things are, create data summaries, track change over time, or be used as a data input into other assessments or projects.

We don't like to toot our own horn, but we think we produce some pretty fine land cover classifications here at Fiera, and you can find one of our most recent products, which covers most of Central Alberta and is available free from the Government of Alberta,  here . This classification required 41 SPOT image tiles from 2017 and 2018 and has 18 different land cover classes, and was used to assess the health of riparian areas (vegetated areas on the banks of rivers, streams, and lakes) for over 25,000 km of shoreline! We're excited to see all of the ways this dataset gets used!

If you have questions about land cover classifications, or are interested in other GIS and remote sensing mapping products, get in touch through our main website,  here !

Fiera Biological Consulting Ltd.

Land cover data shown in this story created by Fiera Biological Consulting Ltd. SPOT imagery and base map data provided by Government of Alberta under the Open Government License - Alberta.

They say every picture tells a story. Well, we would argue every picture tells more than a story ... use the swipe tool above to transform the satellite image on the left into a land cover classification. If only it were that easy to do in real life! So how do we turn an image into invaluable data? Read on!

Comparing spectral resolution - the image on the left has five bands, each of which corresponds to a slice of the EM spectrum, while the image on the right has thousands of narrow bands which gives more information and a more complete spectral signature for every pixel. Image courtesy of Edmund Optics.

Image courtesy of ESRI

The two scenes above were captured at different dates - the top image is from May and the bottom image is from July. What do you notice? Which features pop out better in May versus July?

Satellites are high up there! So, things like clouds can really affect the quality of an image with respect to creating a classification.

In the random forest approach, subsets of the training data are repeatedly sampled (100s of times!) and then a model is chosen that reflects what the majority of the different models predicted. This model is then applied to the entire image to give the classified image.

Example confusion matrix! Overall, this classification was 81% accurate in correctly predicting dogs, rabbits, and cats. The individual class accuracies help us to see which classes are confused with each other and where we can expect errors. For example, if we look at the cats, all of the cat reference samples that we tested against the classified cats were cats! That's pretty good and gives us a Producer's Accuracy of 100%. However, for a dog and a rabbit reference sample, the classification erroneously called these cats, which gives the User's Accuracy of 71%. This means that while the classifier was quite good at correctly calling actual cats cats, it also called some things that weren't cats cats. Therefore, a User of the classification can expect that more things are probably predicted to be cats than are actually cats. Confused yet?

The North Saskatchewan and Battle River Watersheds Land Cover