# Can an area be quantified from a binary color raster? (how much of is x color)

Hi guys

I've been breaking my head trying to figure out a way to do this.

Essentially I have a DTM/DEM, customer wants to know how much of the land is below 23 degrees (45%) slope, so ive done some shaders and its done, simple enough.

Now he asks if i can tell him EXACTLY how much of that land is below 23 degrees... well it should be a simple matter of counting how many pixels are in total in the raster, then subtracting those that are red (over 23 degrees) and what ever is left in pixels multiplied by the pixel resolution should give the correct answer.

The problem is it does not seem to be as straight forward as that, even when i tell global mapper to do the cut-off areas in a sharp binary matter there's still some "blurriness" caused by the compression around the edges of the red, this throws off the whole math

Is there any better, proper way to do this? I guess someone here should know how

Here's an image of the raster, basically I'm being asked to find out how much of it is black and how much is red

Any help on this would be greatly appreciated.

Tagged: