CropAnalysis
CropAnalysis copied to clipboard
Only values of 0 0r -32767 in each array.
I'm trying to follow the project, but I am not being able to plot anything (no errors, just simply nothing shows up). When looking to the original print(dem_arr[0]), it only has values of zero, or --32767.
I get the following shapes: DEM Array Shape: (2, 1329, 1686) DEM Array Data Type: float32
Ortho Array Shape: (7, 2657, 3371) Ortho Array Data Type: uint16
and when flattening and plotting each specific band I also get only zeros or -32767
flattened_ortho4 = ortho_arr[4].flatten()
plt.hist(flattened_dem, bins=50, color='blue', alpha=0.7)
plt.title('Histogram of ORTHO 5th band Values')
plt.xlabel('ORTHO 5th band Value')
plt.ylabel('Frequency')
plt.grid(True)
plt.show()
I've also uploaded the images anew, I don't know if there is any corruption of data. Nothing changed. I tried to add the ortho file in QGIS, add layer, and it seems ok visually. The only thing is it mentiones 3 bands, instead of the 7 python detects and as indicated in the metadata.
What am I doing wrong?
I appreciate the feedback, thanks you