Sorry if my question was poorly phrased, but basically I'm using Python with GDAL to identify vegetation in a TIF file (just using RGB bands). I've looked at the band values in the image, and looking at some random sample points have found that vegetation tends to fall within certain ranges for each band (ex: 30-71 blue, 125-175 green, etc). So this is how I wrote it out, with "arrays" being an array that contains the three bands:
vegetation = (arrays[0] > 67 & arrays[0] < 133) & (arrays[1] > 125 & arrays[1] < 175) & (arrays[2] > 30 & arrays[2] < 71)
And then I create a new file and just use band.WriteArray(vegetation). However, for the vegetation line I get the following error:
The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
What exactly does this mean? Should I be formatting it differently? Python isn't exactly my strength so the simpler the better.