Created
May 5, 2022 21:54
-
-
Save adamjstewart/0dcb61d192bbea5087b78282480f8436 to your computer and use it in GitHub Desktop.
Plotting NDVI with TorchGeo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
transform = AppendNDVI(index_red=0, index_nir=3) | |
sample = transform(sample) | |
sample["image"][-1] = (sample["image"][-1] + 1) / 2 | |
plt.imshow(sample["image"][-1], cmap="RdYlGn_r") | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment