# Calculating raster statistics for each band in QGIS?

i need to calculate raster statistics for RGBN (4 channels, multiband image) rasters in QGIS.

In Arcgis if you use "calculate statistics" in ArcCatalog, statistics are calculated for every image band.

In Qgis if you use "Raster layer statistics" you get a log file with a summary of image stats, so you cannot extract statistics for each band.

Do you know how this is achieved in Qgis?

One way to get statistics for each band in QGIS raster layer is:

5. Add -stats flag to a command (between gdalinfo and path to raster)
• This can be done by creating batch script. Run a FOR loop and call gdalinfo -stats %%G for each image, saving an output to a file. If U're not familiar with scripting I can help U. Just give me more details: are all your images stored in one dir or in subdirs, do you want single report file or a report file for each image, what system you're working on. At the end I think you should edit your question - to keep GIS.SE clean. – jzol Jun 18 '15 at 19:02