Do you know how to do a pairwise o pixel wise raster comparison using PyQGIS or Processing Scripts?
Pairwise or pixel wise comparisons are made between two raster datasets pixel by pixel. That means a pixel in an image a at a[n,n] will be compared with an image b at pixel b[n,n].
Comparisons like this are performed with functions like maximun(a,b)->value, minimun(a,b)->value, equal(a,b)->boolean, etc.
I have found and article that said by using the QgsRasterCalculator I can use functions like this:
le([rast1]@1, [rast2]@1, [rast2]@1) or gt([rast1]@1, [rast2]@1, [rast2]@1)
but none of these worked.
Are there any QgsRasterCalculator function I can use for performing pairwise analysis?
or
Do I have to convert my QgsRater to a Numpy matrix and to a QgsRaster again to perform this kind of analysis? (at first look seems a no so very efficient and CPU time consuming method)