I have a raster image containing values ranging from 1 to 10 in Integer format.
I want to count the number of pixel with value = 1.
Is there any method in Arcpy which returns the pixel count if given raster and value as input?
arcpyraster
I have a raster image containing values ranging from 1 to 10 in Integer format.
I want to count the number of pixel with value = 1.
Is there any method in Arcpy which returns the pixel count if given raster and value as input?
Best Answer
Use the Build Raster Attribute Table tool, then a SearchCursor.