I have a raster with three bands (RGB). I have used the reclassify tool to select only pixels within a certain range of the top band (Red). Those are assigned 1 and all others are assigned 0. In order to fine tune my classification, is it possible to use the other bands as well?
-
1Yes, you could use a Con((Red > X) & (Green > Y) & (Blue < Z),1,0) but depending on what you're trying to achieve a supervised classification might be better than single pixel values. Refer gis.stackexchange.com/questions/115091/…– Michael StimsonCommented Nov 13, 2017 at 2:09
-
That makes sense. I am new to scripting in ArcGIS Pro but I understand the Boolean logic of it. In reading the referenced thread it appears that I will need to use the conditional evaluation statement within the raster calculator and apply it as you mentioned here. How do I include just the red band of my raster? For example, I can type Con(("Zone_1" > 100),1,0) to select those values above 100 but I cannot see how to put the red band into the script.– SteveCCommented Nov 13, 2017 at 2:22
-
Are you using the raster calculator in ArcMap or ArcGIS PRO? In ArcMap I would add the individual bands as raster layers then they would appear in the left window to click on to add their identifier to the Con calculation. If you're in ArcCatalog you would probably want to use the full paths to the bands.– Michael StimsonCommented Nov 13, 2017 at 2:51
-
I am using Pro. I was able to extract bands and now the script works. Thanks for the advice!– SteveCCommented Nov 13, 2017 at 3:19
-
That's great, can you now answer your own question, with screen grabs, for the benefit of others having the same problem - and the interest of those considering PRO (like me).– Michael StimsonCommented Nov 13, 2017 at 3:41
1 Answer
Thanks to Michael Stimson for the advice. Here is my process:
I am starting with a zone from a raster which includes a parking lot:
The image is here:
The more colorful pixels on the right represent parked cars. I would like to select only those pixels containing no cars (empty spaces). For now I will ignore the greenspace on the left and repeat this process with a better clip.
Since I would like to classify pixels by multiple band criteria, I need to create a separate raster for each band. This is achieved with the Extract Bands function (Imagery Ribbon, Analysis Group, Raster Functions then type "extract" in the search.)
Parameters for the red band are here:
This extracts the red band, repeat for the other two. The resulting bands are in three separate rasters here:
Finally use the raster calculator to classify based on red, green and blue pixel values:
Con(("Red_FTC_Zone_1" < 110) & ("Blue_FTC_Zone_1" < 105) & ("Green_FTC_Zone_1" < 110),1,0)
This produces a reclassified raster. This example is not quite right yet. The parameters of the reclassification will now be refined to produce a reliable model which may be replicated for the other parking zones.
Any suggestions to simplify this process would be appreciated as well.