1

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?

5
  • 1
    Yes, 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/… Commented 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.
    – SteveC
    Commented 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. Commented 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!
    – SteveC
    Commented 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). Commented Nov 13, 2017 at 3:41

1 Answer 1

1

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:

enter image description here

The image is here:

enter image description 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.)

enter image description here

Parameters for the red band are here:

enter image description here

This extracts the red band, repeat for the other two. The resulting bands are in three separate rasters here:

enter image description 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.

enter image description here

Any suggestions to simplify this process would be appreciated as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.