I don't have an example in front of me, but I can give you some hints.
You open an image datasource and then grab the histogram for the
image. It will give you the count of each value. I think there is a
GetHistogram method that returns a python dictionary object. Hope
this helps somehow :)
On 4-Jun-06, at 10:45 PM, Yann Chemin wrote:
> Hello list,
> How to use Python shell to get the count of pixels having a certain
> value (i.e. 0) in a loaded raster file?
> Openev-discuss mailing list