FW: [gdal-dev] accessing the histogram

Domazlicky, Eric edomazlicky at tacomacc.edu
Wed Jan 21 12:13:56 EST 2009


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: gdal-dev-bounces at lists.osgeo.org
[mailto:gdal-dev-bounces at lists.osgeo.org] On Behalf Of Greg Fiske
Sent: Wednesday, January 21, 2009 8:43 AM
To: gdal-dev at lists.osgeo.org
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
gfiske at whrc.org 



_______________________________________________
gdal-dev mailing list
gdal-dev at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


More information about the gdal-dev mailing list