β¨ Created with β€οΈ by Heleena Robert
Deforestation Analysis is a simple computer vision project that uses color segmentation to analyze vegetation cover in satellite or aerial images.
It highlights green areas, calculates the percentage of vegetation coverage, and visualizes pixel distribution using BGR and HSV histograms.
This tool is ideal for tracking deforestation trends or comparing forest cover across different time periods.
By automating segmentation and analysis, it provides an easy way to visualize environmental changes over time.
- Vegetation Segmentation: Detects green regions using HSV color thresholds.
- Green Coverage Calculation: Computes % of vegetation pixels.
- Histogram Analysis: Plots BGR and HSV histograms for vegetation trends.
- Automated Output Saving: Saves segmented results and histograms in
output/. - Visual Comparison: Displays original vs segmented images side-by-side.
deforestation-analysis/
β
βββ deforestation_analysis.py # Main script
β
βββ utils/
β βββ color_utils.py # Segmentation + green coverage
β βββ visualization_utils.py # Histograms + visualization
β
βββ input/ # Input images for analysis
β βββ 1985.png
β βββ 1993.png
β βββ 2001.png
β βββ 2011.png
β
βββ output/ # Results auto-saved here
β βββ 1985_segmented.png
β βββ 1985_histogram.png
β βββ 1993_segmented.png
β βββ 1993_histogram.png
β βββ ...
β
βββ assets/ # For README visuals
β βββ banner.png
β βββ sample_segmented.png
β βββ sample_histogram.png
β
βββ requirements.txt
βββ .gitignore
βββ LICENSE
βββ README.md
- Place your forest or aerial images into the
input/folder. - Run the script to process all images.
- View results in the console and check
output/for segmented vegetation maps and histograms.
This project requires the following Python libraries:
- opencv-python β For image processing and color segmentation.
- numpy β For numerical operations and pixel calculations.
- matplotlib β For plotting histograms and displaying results.
git clone https://github.com/HeleenaRobert/deforestation-analysis.git
cd deforestation-analysis
pip install -r requirements.txtpython deforestation_analysis.pyResults will be displayed on-screen and saved automatically in the output/ folder.
This project is licensed under the MIT License.
Heleena Robert
GitHub


