I want the code to read 1st pixel from a bunch of rasters (for eg. 1st pixel from 6 different rasters (having same extent and same number of pixels) and convert it into array followed by reading 2nd pixel from each raster and so on till the last pixel so that the value can be stored and finally be used to make graphs and plots for each/same pixel number in various different images in one folder.
Here is an example python code that I have written.
for file in os.listdir(path):
if(files[23:27]=='NDVI'): #image name has NDVI in it
gdal.UseExceptions()
img = gdal.Open(path_str+"\\"+file)
img_array = np.array(img.GetRasterBand(1).ReadAsArray())