<div dir="ltr"><div><div><div>Caleb,<br><br></div>gdalinfo uses the GetDefaultHistogram() method which can do this faster by fetching a precomputed histogram.<br></div>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.<br>
<br></div>Can you justify adding this extra functionality in gdalinfo?<br><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 5, 2013 at 10:56 AM, Caleb Hanger <span dir="ltr"><<a href="mailto:cdhanger@gmail.com" target="_blank">cdhanger@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">All,<br>
<br>
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:<br>

<br>
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.<br>
2) If not, how come?  Has there been no apparent need for histograms that omit null values or other "out of range" situations?<br>
<br>
Thanks in advance for any insight,<br>
Caleb Hanger<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br><br>+91-9494447584<br>17.2416N 80.1426E
</div>