preforming an image classification

11
PREFORMING AN IMAGE CLASSIFICATION For this exercise I downloaded an ortho image from the USGS’s National Map: Viewer & Download Platform (http://nationalmap.gov/viewer.html). The image that I download is of Clarks Reservation State Park and the surrounding area, it is the NAIP image. The reason I chose this type of area is because it has many classes of land use. It has a quarry, conifer forest, deciduous forest, urban areas, wet lands, agriculture land, open fields and open water. In the United States there are land use maps ready to download. The mentioned website also has the land use files for this area that I downloaded as well. However these land use maps can be out of date or be too broad of an area. What we are going to do is perform an image classification for land use for Clar ks Reservation and the surrounding area. Step 1: Determining what classes you want to group with. For this exercise I am going to use class groups that are normally used in Land Use maps, I will be using a broader group than the Land Use maps. Were the L and Use map I downloaded straight for the USGS site has classes like “Developed –  open field”, “Developed – light”, “Developed – medium”, and “Developed – heavy” I will group all of these simply under “Developed”. The Classes I will be using for this exercise will be:  “Developed Land”: This class will include “Developed – open field”, “Developed – light”, “Developed – medium”, and “Developed – heavy”  which are urban areas. This includes roads, houses, etc...  “Barren Land”: This class will include areas of construction, bare earth, and quarries.  “Deciduous Forest”: This class will include forest areas where a majority of the trees in that area shed their leaves in the fall.  “Conifer Forest”: This class will include forest areas where a majority of the trees in the area have needles all year long.  “Open Water”: This class will include bodies of water, normally deep and year round.  “Wetlands”: This class will include any wetland areas.  “Fields”: This class will incl ude shrub and open fields. Some of these may be agricultural fields that have not been used for a few years.  “Agriculture”: This class will include active farming and pasture lands. Step 2: Add your Ortho Image and optionally the Land Use raster. Before you add anything make sure your coordinate system is set up. For this exercise I will just add a US Counties Outline to my map. This will set the coordinate system for all succeeding raster images. Once a coordinate system is set add your raster image. I will also be adding a USGS supplied land use map. The Land Use raster will use codes for what it is showing. The codes for the area that I am using are 11, 21, 22, 23, 24, 31, 41, 42, 43, 52, 71, 81, 82, 90, and 95. Some of these codes I will group together to make things more simple. Below each class it will tell whe ther it will be grouped with others. For more information about these and other classes look at the raster image’s metadata.

Upload: widiana-safaat

Post on 04-Jun-2018

235 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Preforming an Image Classification

8/13/2019 Preforming an Image Classification

http://slidepdf.com/reader/full/preforming-an-image-classification 1/11

PREFORMING AN IMAGE CLASSIFICATION

For this exercise I downloaded an ortho image from the USGS’s National Map: Viewer & Download

Platform (http://nationalmap.gov/viewer.html). The image that I download is of Clarks Reservation State

Park and the surrounding area, it is the NAIP image. The reason I chose this type of area is because it has

many classes of land use. It has a quarry, conifer forest, deciduous forest, urban areas, wetlands,agriculture land, open fields and open water. In the United States there are land use maps ready to

download. The mentioned website also has the land use files for this area that I downloaded as well.

However these land use maps can be out of date or be too broad of an area. What we are going to do is

perform an image classification for land use for Clarks Reservation and the surrounding area.

Step 1: Determining what classes you want to group with.

For this exercise I am going to use class groups that are normally used in Land Use maps, I will

be using a broader group than the Land Use maps. Were the Land Use map I downloaded straight for

the USGS site has classes like “Developed –  open field”, “Developed – light”, “Developed – medium”,

and “Developed – heavy” I will group all of these simply under “Developed”.

The Classes I will be using for this exercise will be:

  “Developed Land”: This class will include “Developed – open field”, “Developed – light”,

“Developed – medium”, and “Developed – heavy” which are urban areas. This includes roads,

houses, etc...

  “Barren Land”: This class will include areas of construction, bare earth, and quarries.

  “Deciduous Forest”: This class will include forest areas where a majority of the trees in that area

shed their leaves in the fall.

  “Conifer Forest”: This class will include forest areas where a majority of the trees in the areahave needles all year long.

  “Open Water”: This class will include bodies of water, normally deep and year round.

  “Wetlands”: This class will include any wetland areas. 

  “Fields”: This class will include shrub and open fields. Some of these may be agricultural fields

that have not been used for a few years.

  “Agriculture”: This class will include active farming and pasture lands.

Step 2: Add your Ortho Image and optionally the Land Use raster.

Before you add anything make sure your coordinate system is set up. For this exercise I will just

add a US Counties Outline to my map. This will set the coordinate system for all succeeding raster

images. Once a coordinate system is set add your raster image. I will also be adding a USGS supplied

land use map. The Land Use raster will use codes for what it is showing. The codes for the area that I am

using are 11, 21, 22, 23, 24, 31, 41, 42, 43, 52, 71, 81, 82, 90, and 95. Some of these codes I will group

together to make things more simple. Below each class it will tell whether it will be grouped with others.

For more information about these and other classes look at the raster image’s metadata.

Page 2: Preforming an Image Classification

8/13/2019 Preforming an Image Classification

http://slidepdf.com/reader/full/preforming-an-image-classification 2/11

  Open Water: 11

  Developed Land: 21 (Developed Open Space), 22 (Developed Low Intensity), 23 (Developed

Medium Intensity), and 24 (Developed High Intensity).

  Barren Land: 31

  Deciduous Forest: 41 (Deciduous Forest) & 43 (Mixed Forest). The mixed forest areas will be

split up among the deciduous and conifer forests depending which are more present.

  Conifer Forest: 42 (Conifer Forest) & 43 (Mixed Forest). The mixed forest areas will be split up

among the deciduous and conifer forests depending which are more present.

  Fields: 52 (Shrubs/Scrub) & 71 (Grasslands)

  Agriculture: 81 (Pasture/Hay) & 82 (Cultivated Crops)

  Wetlands: 90 (Woody Wetlands) & 95 (Emergent Herbaceous Wetlands)

To group values you want to open the

properties window for your Land Use map.

Once it is open go to the Symbology tab and

change the Show type to “Unique Values”

(green box in figure 1). Then you highlight the

values you want to group by clicking on them

while holding the Shift Key. When all desired

values are highlighted right click on them and

choose the Group Values option (red box in

figure 1).

Figure 1: Grouping values for a Land Use map.

Page 3: Preforming an Image Classification

8/13/2019 Preforming an Image Classification

http://slidepdf.com/reader/full/preforming-an-image-classification 3/11

Figure 2 shows what my Land Use

map values will look like after

grouping values and assigning colors

that will be easy to use. Feel free to

choose colors that you like and find

easy to work with.

You will also want to go to the Display tab and have the transparency set to 50-60%. This will

show us how accurate the Land Use map is according to the ortho image. Below Figure 3 shows that the

areas in red boxes no longer are for agricultural use. There can be some other small inaccuracies.

Figure 3: The red boxes show large areas that no longer match their land use code.

Step 3: Figuring out what is what.

We will start with the most difficult to identify first then move on to the easier to identify

classes. The biggest difficulty can be with separating deciduous and conifer forests. In the late spring,

summer and early fall both these forests will look green. By using the Principal Component Classification

we will be able to see the difference between conifer and deciduous trees. There are other ways of

doing this that will be shown as well.

You will want to select the Image Classification toolbar for this. You will go to Customize, go toToolbars and then go down the list until you see Image Classification (the toolbars are in alphabetic

order).

Figure 2: Land Use with grouped values and decent color scheme.

Figure 4: Image Classification Toolbar

Page 4: Preforming an Image Classification

8/13/2019 Preforming an Image Classification

http://slidepdf.com/reader/full/preforming-an-image-classification 4/11

  The ortho image that I added to my map is named Clarks Ortho. You will want to use the drop

down list on the Image Classification and choose which ortho image you want to classify. I will choose

my Clarks Ortho. Once your ortho image is shown in the display window of the Image Classification

toolbar you will click on the Classification menu on the toolbar. When the drop down list appears you

will want to click on Principal Components.

Figure 5: How to open the Principal Components tool

When the Principal Components tool window opens up you will normally have the most recent raster

image added to your map in the box numbered in Figure 6 as 2. If this is not the raster you want to

perform the principal components on then you will need to select it and press the X button on the right

hand side of the window. You will use the drop down menu (numbered 1 in Figure 6) to add the raster

images you want to use. Then you will want to browse to your project folder and save the raster image

that will be created (numbered 3 in Figure 6).

Figure 6: The principal components tool window.

Figure 7 below is the resulting image from the principal component tool and Figure 8 is the

original image. In Figure 8 the forests are mostly the same color and there is no simple way of seeing

which kind of tree are which. When you look at Figure 7 there are light green and dark green patches for

the forests. The light green is the deciduous forest and the dark green is the conifer forest. Figure 9 is a

Page 5: Preforming an Image Classification

8/13/2019 Preforming an Image Classification

http://slidepdf.com/reader/full/preforming-an-image-classification 5/11

close up of the area that shows conifer forests surrounded with red boxes and deciduous forests

surrounded by yellow boxes.

Figure 7: Resulting raster from the principal component tool.

Figure 8: Original image.

Figure 9: Close up to show difference in forest type. Yellow boxes are deciduous forest and red boxes are conifer forests.

Page 6: Preforming an Image Classification

8/13/2019 Preforming an Image Classification

http://slidepdf.com/reader/full/preforming-an-image-classification 6/11

  The other way of finding out the forest types is to have another ortho image from the early

spring when all the deciduous trees are without leaves. Figure 10 shows another ortho image from early

spring over the Clarks Ortho I want to classify, the conifer forest are in the red boxes and the deciduous

forest is in the yellow boxes. Now that we have a way of separating the different kinds of forest we can

move on to the easier identifiable classes.

Figure 10: An ortho image of the area during the early spring when the deciduous trees have no leaves. The red boxes are the

conifer forests and the yellow boxes are the deciduous forests.

For developed land you will want to look at the ortho image and find houses, roads, sporting

fields, and other urban areas. Some land use maps break these up further but we will keep it simple and

have all developed land in one class. Next you will want to identify which areas is open water, for these

you will look for lakes, ponds, and rivers. For barren land you will want to look for bare earth, this can be

bedrock outcrops and quarries. For wetlands you will want to look for areas of shallow water with lots of

vegetation mixed in with it, these areas are often found near lakes. For agriculture you will want to look

for farmland, these plots are normally rectangular in shape. Fields are found by looking for grasslands

and areas with small scrubs and a few small trees. We can create our samples now that we know what

we are looking for.

Step 4: Creating class samples.

Now that we know what will make up our classes we will make samples so that the Interactive

Supervised Classification tool can make a raster showing us land use for the entire raster image. We will

be using the Image Classification Toolbar for this step as well. If you closed it you will need to open it

again, instructions how to do so are in the beginning of step 3. At this point you may have multiple

raster images added to your map, you will want to make sure the raster image you want to classify isshown in the Image Classification Toolbar display window (red box in Figure 11).

Figure 11: Image Classification Toolbar with desired raster selected.

Page 7: Preforming an Image Classification

8/13/2019 Preforming an Image Classification

http://slidepdf.com/reader/full/preforming-an-image-classification 7/11

  When the correct raster is selected you will want to open the Training Sample Manager (red box

in Figure 12).

Figure 12: Training Sample Manager button on the Image Classification Toolbar.

The main function that we will use in the Training Sample Manager is the Merge Training Sample

button (red box in Figure 13). When creating samples it is important to choose more than 1 sample if

possible, the merge button will allow us to group similar samples into the classes we want.

Figure 13: Training Sample Manager window with Merge Training Samples button outlined in red.

To create our samples we will use the polygon tool on the Image Classification Toolbar (red box

in Figure 14).

Figure 14: Draw Polygon tool on the Image Classification Toolbar.

We will start the classification with Open Water because there is only one large body of water.

You will want to click on the Draw Polygon tool. Then you will draw a polygon around the lake. You do

not have to draw the polygon right at the edge of the lake; doing so could include some of the shore and

throw off the classification. Zooming in will help with drawing sample polygons. When you finish

drawing the polygon, you finish drawing by double clicking at the last point; class 1 will appear in the

Training Sample Manager with a random color assigned (Figure 15). You will want to change the name of

the class to Open Water and you may also want to assign a better color as well (Figure 16).

Page 8: Preforming an Image Classification

8/13/2019 Preforming an Image Classification

http://slidepdf.com/reader/full/preforming-an-image-classification 8/11

 

Figure 15: Open Water polygon before renaming.

Figure 16: Open Water polygon after renaming.

Next we will do Developed Lands; this is done the same way as the Open Water. You will have

more than one sample for Developed Lands. As you can see in Figure 17 I picked 4 samples for

Developed Lands. I choose houses, roads, and a school. In the Training Sample Manager window you will

want to select all the Developed Land polygons you created and click the Merge Training Sample button.

In Figure 18 we see that once they are merged they will have the same color. You will also want torename the class Developed Land.

Page 9: Preforming an Image Classification

8/13/2019 Preforming an Image Classification

http://slidepdf.com/reader/full/preforming-an-image-classification 9/11

 

Figure 17: Developed Land polygons.

Figure 18: Merged classes making up the Developed Lands.

Next we will select Conifer Forests. You will want to make sure you turn on either the Principal

Component raster that we created or the early spring ortho that you have found. You will still want the

display window on the Image Classification toolbar to be the original ortho image, Clarks Ortho in my

case (do not change it to the early spring ortho or principal component raster). Then you will proceed

like you did for the Developed Lands. Figure 19 shows what I did. You will use the merge tool for this as

you did with Developed Lands. Figure 20 shows the polygons created for Deciduous Forests. Once these

are done you can go through the other classes and create sample polygons for them, aim for 3 – 4

samples per class. Figure 21 shows all the classes sampled, I have changed the colors to match those

that are used for the land use raster obtained from the USGS, this will make comparing the resultseasier.

Page 10: Preforming an Image Classification

8/13/2019 Preforming an Image Classification

http://slidepdf.com/reader/full/preforming-an-image-classification 10/11

 

Figure 19: Using the principal component raster to select conifer forests.

Figure 20: Using the principal component raster to select deciduous forests.

Figure 21: Clarks Ortho with samples for all classes.

Page 11: Preforming an Image Classification

8/13/2019 Preforming an Image Classification

http://slidepdf.com/reader/full/preforming-an-image-classification 11/11

  When you have samples for all the classes that you want you will want to click on the

Classification button on the Image Classification Toolbar and select Interactive Supervised Classification

from the drop down menu (Figure 22).

Figure 22: Selecting the Interactive Supervised Classification tool from the Image Classification Toolbar.

Once you click on the Interactive Supervised Classification tool it will begin the tool, no tool

window will open up. When the tool is finished you will get a raster similar to the one in Figure 23. There

are bound to be some errors in the classification, the main cause of these errors are shadows. Another

source of error is the lack of enough samples. If your classification does not meet your standards youcan look and see where those errors are and go back and make sure those are areas to sample. The

more you do this the more accurate your classification will be. As you can see this map in Figure 23 is

much easier to look at than the USGS provided land use map in Figure 24.

Figure 23: Classification map showing land use.

Figure 24: USGS provided land use map.