1

I'm analyzing open-source NIR images with Python. I'm a novice to remote-sensing and have a doubt about my NDVI results.

I calculate my NDVI like so:

    with rasterio.open(self.tif_path) as src:
        # Read bands 4 (NIR) and 1 (Red)
        nir = self.rescale_image_array(src.read(4)).astype(float)
        red = self.rescale_image_array(src.read(1)).astype(float)

        # Calculate NDVI
        ndvi = np.true_divide((nir - red), (nir + red))

        print("Minimum NDVI:", np.min(ndvi))
        print("Maximum NDVI:", np.max(ndvi))

This is giving me values from -1 to 1 as expected.

However, the visual of the NDVI shows almost exclusively positive NDVI values, although the picture contains streets, buildings and water, which should have low NDVI values according to what I read about NDVI...

water,

enter image description here

As can be seen, streets and buildings have values of around 0 (white) and only the water surface have slightly negative values (blue).

Does this indicate that I did something wrong during the processing or is this a result that can be expected?

0

1 Answer 1

2

This is quite normal. In many situations the NDVI doesn't go far below 0. This is why often the color palette will be chosen that everything below 0 is water, rather than putting water (blue) at value -1.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.