There is no histogram in raster files sitting there for you to access.
You have to calculate it yourself using the pixel data. Here is a good
example of doing it in C#
http://www.codeproject.com/KB/cs/Image_Histograms.aspx

I would familiarize yourself with the ReadRaster functions so you know
how to actually access the pixel data of GDAL raster file so you can
calculate the histogram.
http://trac.osgeo.org/gdal/wiki/GdalOgrCsharpRaster


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Greg Fiske
Sent: Wednesday, January 21, 2009 8:43 AM
To: [email protected]
Subject: [gdal-dev] accessing the histogram

Hello folks,

Can somebody demonstrate how I can access the histogram of a
raster image.  Ultimately, I'd like to dump it to a text file as
well (I have many images to assess).

Thanks for any advice,

Greg


Gregory J. Fiske
GIS Manager/Research Associate
The Woods Hole Research Center
149 Woods Hole Road
Falmouth, Massachusetts 02540
508-540-9900 x139
http://whrc.org
[email protected] 



_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to