This project focuses on visualizing multi-spectral satellite imagery data and detecting clouds using a rule-based masking approach. The output includes RGB composites, NDVI maps, cloud masks, and cloud-masked RGB/NDVI images for five satellite scenes.
- Goal: Understand how clouds appear in different spectral bands and apply a basic cloud detection algorithm.
- Tech Stack: Python, NumPy, Matplotlib, Google Colab
- Data Type: Multi-spectral satellite imagery (13 bands per scene)
- Scenes Used: 5 distinct satellite image scenes
- Five
.npy
files representing multi-spectral scenes. - Each file contains a
(13, H, W)
array: 13 spectral bands for a given scene. - Uploaded and processed in Google Colab.
- Load multi-spectral .npy files
- Normalize key spectral bands (Blue, Green, Red, NIR, SWIR1)
- Generate RGB composites
- Calculate NDVI
- Detect clouds using a simple threshold-based rule:
cloud_mask = ( (Blue > 0.25) & (Green > 0.25) & (Red > 0.25) & (NIR > 0.25) & (SWIR1 < 0.3) )
- Visualize and save:
- Original RGB
- NDVI
- Cloud masks
- RGB & NDVI with cloud masking applied
sceneX_rgb.png
: Original RGBsceneX_ndvi.png
: Original NDVIsceneX_cloud_mask.png
: Detected cloud masksceneX_rgb_masked.png
: RGB with clouds masked (gray)sceneX_ndvi_masked.png
: NDVI with cloud areas set to NaN
- Clouds are bright in visible/NIR but not in SWIR
- Simple rule-based masking works surprisingly well for clear/cloudy scenes
- Visualizing different spectral bands is crucial for remote sensing analysis
- Upload all
.npy
files to a folder - Load them into a list using
np.load()
- Follow the notebook code to process each scene
- Visualize and export images using
matplotlib
Vinit Singh Pathir
LinkedIn
Feel free to reach out if you want to collaborate on remote sensing, data science, or climate projects!
This project is open-source and free to use under the MIT License.