Caleb, gdalinfo uses the GetDefaultHistogram() method which can do this faster by fetching a precomputed histogram. gdalinfo is a command line program. Even a default histogram of 256 buckets is hard to visualize in text mode. A much better way is to use a desktop GIS like qgis to view the histogram.
Can you justify adding this extra functionality in gdalinfo? On Tue, Mar 5, 2013 at 10:56 AM, Caleb Hanger <cdhan...@gmail.com> wrote: > All, > > I am writing a script which is calling gdalinfo to get a histogram of > pixel values in an image file. Apparently the mechanism for obtaining a > "default" histogram enables the "bIncludeOutOfRange" flag to dump > not-in-range pixels (including null pixels, in formats that support it) > into whichever bin of the histogram is closest. I see that in the > GetHistogram() function, the functionality is already coded to respond > appropriately to either a true *or* false value in this flag. However, I > can't seem to find any way to turn that flag off through any of the > user-level programs (in particular, gdalinfo), rendering the parameter to > the function useless, unless I'm just not looking hard enough. Hence, my > questions: > > 1) Is there any standard user-level operation (preferably in gdalinfo) > which disables, or at least *allows* for disabling of, the > bIncludeOutOfRange flag? If so, I can't find it. > 2) If not, how come? Has there been no apparent need for histograms that > omit null values or other "out of range" situations? > > Thanks in advance for any insight, > Caleb Hanger > _______________________________________________ > gdal-dev mailing list > gdal-dev@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/gdal-dev > -- Best regards, Chaitanya kumar CH. +91-9494447584 17.2416N 80.1426E
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev