I want to compare NDVI of 2 images(TIF) of the same area of interest using python. My end result is to get the region on the image where NDVI is decreased(to depict crop damage). Problem: Images have a small difference in resolution or pixel size (maximum of 2 rows or columns). So, I believe images with different number of pixels cannot be compared pixel by pixel. Is it possible? If yes, how? (I am using numpy array for comparison)

If I Resample the 2 images to match the number of pixels, but how do I resample it without changing band values as I don't want any error in NDVI values?

Is there any difference if I resample the real TIF(4 band) image and then find NDVI, or create an NDVI(1 band) image using real TIF and resample it? Which is better, and which has less data loss?

Is there any other solution instead of pixel comparison? Would be a great help any python source code or libraries are mentioned.

  • Is the difference between images in the spatial resolution of the pixels or the dimensions (row/columns - number of pixels)? gdalinfo filename will display the size and spatial resolution of the images. – tda Jul 20 '18 at 10:29

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.