I have some single-band rasters (NDVI) on Qgis, for which I can obtain their distribution histogram by going to Right-click > Properties > Histogram Tab > Compute Histogram. This is an example of what I get:

enter image description here

This is the same procedure (and also works) for multi-band images (RGB etc). However, I wonder what is the default bin size that QGis used to calculate and render this histogram? I obtained this histogram without modifying any setting on the Prefs/Actions tab.

In the case of RGB images surely the bin size should be >=1, as pixels can only be in the discrete interval of [0,255] and it wouldn't make sense to have a lower bin size (say, 0.5 pixel value).

However, in the case of NDVI and similar indexes non-integer bin sizes are viable, even more given that the NDVI lies between [-1,1]. So, I wonder how QGis determines this bin size, as I need to know what value was used to properly compare with other histograms I produce manually.

Edit: I am using QGIS 2.14.12-Essen

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.