Skip to content

Application belonging to Conference Paper "Methodology for automatic detection of trees and shrubs in aerial pictures from UAS".

Notifications You must be signed in to change notification settings

mantoniogr/green_areas_detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Green Areas Detection Tool

This tool is part of the work presented in the conference paper:
"Methodology for Automatic Detection of Trees and Shrubs in Aerial Pictures from UAS"
Read the paper on ResearchGate

Overview

This project provides tools for analyzing and segmenting green areas in aerial images using HSV color space. It consists of two main components:

  1. Hue Selection Tool (hSelection.py): Analyzes Hue values in a selected region of interest (ROI)
  2. Color Segmentation Tool (colorSegmentation.py): Segments images based on specified Hue ranges

Installation

git clone https://github.com/yourusername/green_areas_detection.git
cd green_areas_detection
pip install -r requirements.txt

Usage

Hue Selection Tool

Analyzes Hue values in a region of interest and saves HSV channel visualizations.

python hSelection.py --input <image_path> \
                    --output-dir <output_directory> \
                    --roi <x1> <x2> <y1> <y2>

Options:

  • --input, -i: Input image path (default: images/lena.png)
  • --output-dir, -o: Output directory for saved images (default: images)
  • --roi: Region of Interest coordinates [x1 x2 y1 y2] (default: 200 230 200 230)

Color Segmentation Tool

Segments images based on specified Hue ranges in HSV color space.

python colorSegmentation.py --input <image_path> \
                          --output <output_path> \
                          --hue-range <min> <max>

Options:

  • --input, -i: Input image path (default: images/lena.png)
  • --output, -o: Output image path (default: images/result.png)
  • --hue-range: Hue range [min max] (default: 133 168)

Examples

# Analyze ROI in a custom image
python hSelection.py -i aerial_image.jpg --roi 100 200 100 200

# Segment green areas
python colorSegmentation.py -i aerial_image.jpg -o result.jpg --hue-range 60 120

Requirements

  • Python 3.6+
  • Core dependencies:
    • OpenCV (opencv-python==4.11.0.86)
    • NumPy (numpy==2.2.3)
    • Matplotlib (matplotlib==3.10.0)

Full list of dependencies with versions:

contourpy==1.3.1
cycler==0.12.1
fonttools==4.56.0
kiwisolver==1.4.8
matplotlib==3.10.0
numpy==2.2.3
opencv-contrib-python==4.11.0.86
opencv-python==4.11.0.86
packaging==24.2
pillow==11.1.0
pyparsing==3.2.1
python-dateutil==2.9.0.post0
six==1.17.0

You can install all dependencies using:

pip install -r requirements.txt

License

MIT License

Citation

If you use this tool in your research, please cite:

@inproceedings{garduno2015automatic,
    author    = {Garduño-Ramón, Marco Antonio and Sánchez-Gómez, Jesús Iván and Morales-Hernández, Luis Alberto and Benítez-Rangel, Juan Primo and Osornio-Ríos, Roque Alfredo},
    title     = {Methodology for Automatic Detection of Trees and Shrubs in Aerial Pictures from UAS},
    booktitle = {Proceedings of the 11th International Congress on Engineering (CONIIN 2015)},
    year      = {2015},
    month     = {May},
    address   = {Querétaro, Mexico},
}

About

Application belonging to Conference Paper "Methodology for automatic detection of trees and shrubs in aerial pictures from UAS".

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages