Supervised Image Classification in ArcGIS Desktop - ArcMap

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so today I want to talk about image classification with our chest and what I'm going to show you today is how to classify Landsat image to make a land cover map so first what's Landsat image if you go to a Landsat looks web page you can kind of get an idea what a Landsat images but if you're going here these are basically images taken taken from space and and they have multi bands and what's cool about them is that you can get some pretty good images of the earth and the newest Landsat you can get it like eight bands but all the Landsat you have like seven bands and with those images you can do things that are pretty cool like classify images so if I look here for example I could just visually see that I have things like forests I think you're like agriculture I have some water bodies and I have here maybe some kind of a small urban early suburban area and so what I'm doing right now is I'm looking at this land cover and I'm thinking okay what is the land use that's happening there and I'm classifying it just quickly saying okay here's a forest here's our culture we can actually get the computer to do that for us by sampling parts of the image and saying what they are and then afterwards the computers algorithms an art GIS can go through and classify them into different land cover types of Pino what we choose and so for example we can get something like this where we can see this study area having the original image right here but then you have here just this is comparing different types of classification methods you can see here that you can have these covers that we can use to measure how much area we have for examples urban how much areas pasture how much areas water this we use so useful whenever you do time analysis anyways let's see how we can do this go ahead close these all up but if you want to get an image go ahead and go to the Landsat look viewer and then from there you can find an image and what you want to do is download one of the images for your study area so I went ahead and downloaded image and image I downloaded was for Redlands California and if you look here with images that you download from Landsat look they come in multiple bands so you can see here I have this tip for band one this tip for band two is two for band three each one of those are just a single a single image band and you can see here what's going on but basically it just represents one color that's that's happening there so here this would be the blue color the green color the red color and then we start when it's infrareds for example and start seeing what's happening an infra red but that's not very useful for arcmap what's useful is whenever you use the MTL and so if i open this up you can see what it is but basically it's just a text file here in ntl file that arcmap will use to add in the data and compile those bands into one single image because they're truly all just one single image so you see here like it's going here and it's finding the different images and putting them together into one single image and so let's go into arcmap so we can see a little bit better but all these images here that you're seeing here if I go into arcmap now I'm gonna go ahead and get add data I remember whatever you do add data yet they always connect your folder and so for example I have my desktop connected and then I go to image class that's my folder where I put everything and so here I have my Landsat image and so you see here I can see each individual bama at the same time that MTL look at it now how it shows up it shows up as an image this is a raster and it has a little satellite even across it and when I add that one into arcmap what's cool about it is that it compiles those bands and you see here like red green and blue show up and this would be your natural color image for an area and so if I go into the properties here I have options under the symbology to start changing them around and you can see here are the names of the other bands near-infrared janna frets you and of course mid infrared so this is what Landsat image looks like you can see here that is kind of at an angle this is because the path of the satellite puts a little bit of angle as what ends up happens with the gia rectification process is that you take the image and you rotate it to north and then you end up with these black kind of box bands right here those are those it actually possibly get rid of with arcmap by going into the layer properties and under layer properties under symbology tab you have ability to look down and say displays a background value RGB we know that the our GB value of zero zero zero is black and so whenever I click on that zero zero zero and I say display as nothing no color I can actually get rid of some of those black bands to get a better looking image so like I was saying in this lab I wanted to use the spatial analyst extension to use image classification so I'm gonna want to make sure I go into customize extensions and make sure that I have the spatial analyst extension checked on that turns on that license so I'm ever go to customize extensions that turns on that license and allows you to go and actually do image classification if I go now here into the gray space and open that up I can see that there's an image classification toolbar so I bring that up and here now I have the ability to do image classification so the toolbar basically is used to create training samples and signature files once you have your signature file that's going to be used to identify what category each pixel goes into it so the algorithm uses that signature file to do the classification so you have to make the sensor file if you plan on doing a supervised classification there's also options for unsupervised classification but at least today we're looking at supervised classification which means that we actually go through and trained the algorithm to reckon to recognize the different categories to our likings unsupervised it will go through and just categorize them based off of groupings its own groupings that it makes just by number of categories you choose so still tour of the image classification toolbar you have here the training sample drawing tool here you can use this to draw polygons that will make your to make your training file so I can just go here and click for example and make polygons if I go into my training sample manager that allows me to go and select files rename select polygons rename them and even delete them so I get the delete button and they go away go away for example once you're in here you have some options to to group the polygons we're going to look at that check out the scatter plots and of course crates answer files and then finally once you get your sense your file you go through here and you're gonna go ahead and do one of these classification methods to classify your image so in my classification I'm down working in a study area so I have my area of interest my aoi if I click OK I just have a box basically where I'm playing on working you can limit your your work into a study area and then later on even process just that area so that way you can save your time some effort whenever you're processing later on I said it's processing the whole image for example and so since this is the area that I'm interested in that I want to do it's going to be important that I try to take my trainings in this area as well because that's going to help the classification be better each area is going to have unique signature so you want to create things for that area so I'm play on using six classes forest water and grassland agriculture residential and commercial industrial and so first let's go with residential why not that sounds like fun and so if I zooming on for example an area that was considered a residential area I can see that this image a little bit hard to read that's just because the lower resolution that the Landsat images are from this air from this level I can kind of see that it looks pretty clear but as soon as I get in a little bit starts blurring out quite quickly and it comes a little bit hard to look at what's going on one option is that you know you can go here and add a base map and then with the base map you can use aerial imagery to help you look more clearly what's going on here was nice of the aerial imagery is higher a higher spatial resolution because those are going to be something like one meter or one foot but on those ones from space we have things from 30 meters typically and so 30 meters a lot lower resolution than 1 meter you know it's easy to say but the one from space though it has a higher spectral resolution it's going to have eight bands while the aerial images only have three bands and so for image classifications natural resolution is also very important so I'm just waiting here for this base map Chad okay so my base map added if I turn off this for example I can see the difference it's quite amazing the difference between the resolution of aerial image versus satellite image and so I can go here and use this to help me determine what's residential like for example this was not residential this was commercial but on the Landsat image you might be hard to tell because of the blurriness and so if I go through here I just make sure that the Landsat image has about the same land cover going on as the aerial image I can use the aerial image to do my training sample don't think they have to be careful about is that things change over time and so for example here I have residential and I know that I want to do a training file here that says this is residential what makes it residential and land cover well one thing is that if I look closely it is a kind of a mix between forests or you know trees concrete housing roofs and those things are going to give it a very particular residence of residential signature and so if I go back to my study area and zoom to it I want to get six of these residential areas and I can see that this residential area might look a little bit different then this one over here so I'm gonna zoom in over here and check out this one and say okay I want to another training sample here check on and off the Landsat image just to make sure that nothing major has changed over the time you can see here for example these retention ponds here are full in the Landsat image well they're not into aerial image so you want to make sure you're the same thing going on and so here for example is another pretty good area for residential so I'm gonna go through here and I'm going to trace out a residential block again whenever I'm clicking my polygons I double click to finish it off and I keep on doing this six times and it doesn't really matter so much about having good distribution or you know actually doing a very good job classifying it it's just that the stuff that's within that polygon needs to be residential that's what's the most important aspect of it it's not you're not actually going through and making any map right now I'm not digitizing like for example a neighborhood you're just saying that everything within this polygon is residential and so I want to do that a good 6 times at least the more you do the better that's just a the simple rule of it all the more you give the the the algorithm something to use to train on its going to actually do a better job and so here for example I'll just make sure those things are the same they are so that's good news and I just go through here and I just keep on making my residential ones and you can see that these neighborhoods have very different types of neighborhoods going on you can imagine a classification scheme where you just care about residential maybe you're gonna actually say you know different types of residential single-family homes multi-family homes suburban you can even just look like that but in this case we're just doing general really broad you know category of residential so you can see here I have a bunch of polygons can be made of residential areas okay so once I keep on adding all these I can go to my training sample manager and you can see here I put them all into their separate classes but I know that these are all residential and so I want to click on all the different classes that I have by just shift clicking to the very bottom they selects them all and then I say merge and this is gonna merge all the training samples into one and then here now I know that this is residential so I can go and type in residential and so now I've done a good sample for residential and now I want to move on I went to forest water all the different types of classifications that I plan on doing so I'm going to go ahead and do that and I'm gonna pause the recording so you don't have to watch me do so many of them okay so now I've gone through and I've done all these classes you see residential forest water at grassland agriculture commercial industrial and you can see here the different areas that I have and then for example I click on commercial industrial you'll see that those get selected here the Grays a little bit hard to read so let's switch it over to a orange and so here you can see them now so and then if I go and click on agriculture you can see where the Agriculture's are for grasslands so yeah again these are just ones that I selected myself so this is my training now what I want to do is I want to create a signature file for each one of these categories that would be used later to classify the rest of the study area and so forth for one thing that I can do is I can click on all these and check my scatter plots this is very important to make sure that everything shows up on the scatter plots clearly because this is what's going to be used afterwards to make your training training sample I don't know why this isn't working in a second oh but before we do that let's do something that's very important let's um save these training samples that we did because this is something that you don't want to lose is the training samples so if you click on save training samples here you can go to your folder that you've been working on and save here your training example so I can put your training samples this is nice because once you start once you clear them out they can go you can lose them this all being safe temporarily right now okay so once you have your training and your sample saved go ahead and select all of your bands all of your categories and make sure that your you know of course your target is the multispectral but once you select all those and you have that targets multispectral if you click on show scatter plots that's going to bring up these scatter plots here and so what you want to see with the scatter plots I'm sorry what you wants to the scatter plots is good separation between the different types of pixels because because this is how it's going to be able to see the differences and so you want to see here for example not a lot of mixing between for example greens and grey so you can see this dark green is really hanging out here on infrared while this gray over here is hanging out in its own category you don't find a lot of mixing going on between the infra red versus blue versus green versus blue red versus blue you see nice separations if you're seeing something especially in these bands down here that are all mixed up and you're gonna see something down here with some of the lower bands like mid infrared versus blue you're starting to see a little bit but it's actually really great separation that's happening all across the board here if I keep going down you can see some good example of maybe that's more mixed up like your infrared versus mid infrared or different smear every two versus mid infrared if you're seeing something that's more mixed up like this in a blue versus like green these categories maybe you miscounted probably something you want to see good separations here so if your training sample has areas made mistakes and you put some residential/commercial you might be mixing up these scatter plots and so these scatter plots might not have these really good separations but because you have these good separations you can make a good signature file that would be able to you to be able to look at the spectral information for each pixel and categorize it based off of the categories you chose so because I like this the categories this is a separation I saw there I'm going to want to go ahead and make a signature file and so you can see the button get create signature file that's gonna save that file GSG file that I can use later for classification and so I'm gonna go ahead and save that and all that does is it's going to go through and find these different kinds of band ratios to say that this category forest looks like this type of scenes so I want to do a maximum likelihood classification there's a lot of different types of classifications out there and arcmap is not even the best program for this there's a lot of different programs out there like bird Oz that do a lot of have a lot more options but for our situation here trying to work in arcmap and maximum-likelihood classification is a very good one so i'm going to go ahead and run maximum likely hood classification and again anytime you want to know anything that's going on you can always check out tool help and actually yes riced will help is quite impressive it tells you a lot of information about how the tools work and so I would check this out and even look at these more in-depth articles that shows examples and how you can convert things over and so forth okay so so once I had that maximum-likelihood classification wizard going on here this is where I need to select some things and so I want of course to classify my in my MTL file here my input suture file that's when I saved I can go find that GSG else and I had that saved I want to put where I'm gonna put my output which I'm gonna save here I'm so-called class class II image why not that's a fun and I'm gonna leave the other sans other values here by default but you can check them out and depend on your area these are all gonna have different kinds of ideas like you can try out different Trevor different settings see what gives you the best also I want to limit what I'm classifying just to the area of interest I have so I can go to environments and then under environments I can check out my processing extent and processing extent will allow me to go here and choose the same as Aoi and whenever I say same as Aoi basically is going to limit it to what's going on in this shapefile which is you can see here this red line that I have on my screen and so I hit OK for that and then whenever I have all my settings I go ahead and hit OK and so that's gonna process now and what you can see here is you can see the globe turning and then you get this not so good results this is not the result I was wanting i got a classy image with only one category so something went wrong so sometimes things go wrong and so if I look here and I'll point out to be table I know that I don't just have one count of I have many different values so something I'm thinking happened with my signature file so let's go ahead and close that classy image was a bust so we're gonna remove that maybe one problem I had is that I didn't have this one turned on so I'm gonna try remaking my central file with that turned on see if that makes any difference at all so I'm gonna go through again and create my signature file and I say yes I want to replace it and then if I go to my classification I'm gonna go ahead and say maximum likely the classification input center file let's see if this opens up and remember I'm working out the desktop oh so they that's the problem I used the wrong teacher fox i working off of this folder and actually my since your father i need to be working off because when i just created which is this one so this actually is a pretty good lesson because it shows you that when you make a sensor file for one area it won't work for another area so anyways this hit open here that's gonna save that now that i bested supplements a classy image i'm an ad number two at the end of that whenever i add number two at the end of that i just know that incrementing that number up so the one that the highest number will be the one that is going to have my value so i go ahead and it save for that one and then i hit okay and so now it's going again here it is image likelihood classification running what's interesting is that i didn't have to go and reset my environments because my environment setting should not actually hit my environments that he didn't set so you see what happened here now on my class the image number three is that I ended up classifying the entire image so again I don't like that so much Ami's number two so I'm gonna probably do for a third time and so if I go back to my area of interest into layer I'm gonna say now classification maximum likelihood classification all the same settings make sure I have that sensor file from my desktop image class and then my output now I'm doing classy image 3 and in my environments I'm gonna do a process an extent of my Aoi okay and okay so now third time's the charm finally works went ahead and classified that image and so what are you seeing here look at this so I have here these categories the colors are matching these original colors I had here because it's randomly choosing colors but I know that the value for one is forest so this one is forest for example and so I can go through here and I can actually start switching out the colors if I want to make them look more the way they're supposed to so like for example blue for water or green for forest or maybe I do a dark green for forest you know I can do things like that or I can just leave it whatever color I feel like leaving them as but just remember that these numbers are going to be corresponding to these values here so you need to remember which one of those values are which what's kind of cool also now is that I can open up attribute table and I can see the number of count of pixels and so you here now I can start saying mmm what is my dominant land juice is gonna be number value number five which was residential so residential has 327 thousand pixels while value number four which is agriculture is 146 thousand pixels within this I can do this for multiple years I start seeing how things are changing to an agriculture or residential or commercial based off of what's going on in here these are very useful for doing stuff like deforestation studies for example one thing I like doing is I like taking these values now selecting them all and then copying these selected features and then going over into Excel what's nice about that is that Excel would be able to actually make some cool charts and so if I go here now and well some reason doesn't want to copy let's try that again okay copy selected so I'm gonna do it paste yes and so now here I can see I have these values here and so I know my value one was a forest my value 2 was water my value for was agriculture no residential residential I can you know I just looking back at what I did here up sorry about that I'm just looking back at what I did here so number six is commercial residential number three was talking number four was agriculture bicultural and then number three was a grassland okay and so now what's interesting is I can take these to move this over and once I have that I can say insert a pie chart' and so this is kind of cool that you start doing things like this or of course doesn't work now let me try this again typical computer you have to do things over and over for the door insert pie chart still not doing it okay not a problem let's try it like this insert pie chart yes okay and so right now our only issues that the values are showing up as you see what's happening here under serious options no legend no so there's a way to get this labels to work oh yeah so I didn't see it's like data and then here label range the labels are these okay there we go and so here now I have this cool pie chart that has these labels that show what's going on up here and what's most important and I can even go through here and add these percentages and so I can see that residential is 39 percent of my land cover in the area and I have here zero percent I'm wondering what is your percent sure I know cuz I guess that supposed to be the water because so little water going on a sensor in an arid environment 70% agriculture 13 percent of of commercial and 17 percent of forest and so I get an idea imagine you go to an area and say what is the dominant land cover well here it's interesting our dominant land cover is residential anyways that's how we do this we do image classification arcmap you see it's pretty quick and painless you download your Landsat image from from Internet it doesn't have to be Landsat it can be aerial photography it could be any kind of image you want what you do then you go to the training sample start drawing these polygons out for the different land cover areas that you're interested in once you draw all these different polygons out and you group them up by different classifications you check that scatterplot make sure you have good separation if that's true say this intro file and finally brought the maximum likelihood classification or the classification of your choosing and you might do it a few times to get to work but once it does work you'll end up with the classified image like that so that is doing image classification in arcmap
Info
Channel: Moulay Anwar Sounny-Slitine
Views: 29,909
Rating: 4.9673471 out of 5
Keywords: GIS, Landsat, Image Classification
Id: HC2QbrIvc2g
Channel Id: undefined
Length: 30min 19sec (1819 seconds)
Published: Thu Oct 26 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.