Quantcast
Viewing all articles
Browse latest Browse all 190

Causes for different results of same raster calculation in Manifold 9 vs QGIS 3.22.12?

I have an RGB orthophoto from which I want to calculate the KANA index (normalised difference of R and B). I have tried out the same calculation in Manifold and in QGIS, and it results in slightly different values - obviously the data used is the same, because both products are much too similar for something to have gone wrong there. But there is a slight difference the origin of which I would like to understand.

QGIS Raster Calculator input:(layer@1 - layer@3) / (layer@1 + layer@3)

Manifold SQL query:CASTV (((TileChannel([Tile], 0) - TileChannel([Tile], 2 )) / (TileChannel([Tile], 0) + TileChannel([Tile], 2 ))) AS FLOAT32)

Note that Manifold numbers the bands from 0, so the bands used in both cases are the same.

The Manifold output gives a mean value of 0.17448442971504 and a standard deviation of 0.20390588745175. The QGIS output has a mean value of 0.17452888428839 and a standard deviation of 0.20401890493367. Not a significant difference in my situation, but I would like to know where it's coming from in case it does become significant another time.

I originally suspected (as mentioned elsewhere) that it was a floating point issue, but I double-checked that in both instances the input is uint8 and the output float32. I am running both Manifold 9 and QGIS 3.22.12 Bialowieza in 64 bit, my OS also being 64 bit. Might this interefere with the internals of the raster calculator?

Also, the Manifold output has a size of 96942 x 34244 px, while the QGIS output has a size of 96943 x 34245 px which it takes from the orthophoto extent. Again, this is not directly relevant for me as the area of interest does not cover the full extent of the raster, but I'm curious as to where it comes from.

EDIT: I also tried subtracting both outputs from each other, and the result was definitely non-zero, so there is a difference between actual pixel values, not just in the raster layer statistics I show above.


Viewing all articles
Browse latest Browse all 190

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>