I have tiff files extracted from google earth engine from the same boundary location. I open these files using rasterio in python and then convert them into numpy array. But what happens is that despite the numpy arrays showing the same area they're misaligned. How can I fix this. I'm using the code below to read the tiff files and save them
import rasterio as rs
from rasterio.plot import reshape_as_image
from skimage import exposure
import numpy as np
import cv2
raster_file = reshape_as_image(rs.open(file_path).read())
mask = np.ones_like(raster_file)
mask[np.isnan(raster_file)] = 0
img_fixed = exposure.equalize_hist(raster_file,mask=mask)
img_fixed *= 255
img_fixed = img_fixed.astype('uint8')
png_file_path = file_path[:-4] + ".png"
cv2.imwrite(png_file_path, img_fixed)
One of the images is sentinel-1 ASCENDING VH 2022 and the other one from the same satellite and DESCENDING VV 2018 when using the data from the same year I don't have such a problem they're exactly aligned but when they're from different years they're not. I appreciate any help :)