I'm trying to resize an NDVI image (derived by Sentinel 2 bands) with different methods in Python, but I always get an image whose values are 0.
I want that my image's dimensions are divisible by 5.
Here is my original image.
I tried different methods, for example using cv2:
new_size = np.asarray(image1.shape) /5
new_size = new_size.astype(int) *5
image1 = cv2.resize(image1.astype('float32'), (new_size[0],new_size[1]))
And this is the result
Other methods (pillow, gdal, rasterio) return the same result. Does anyone know how to correctly resize the image?