Skip to content

MohammadAdnan652/Crop-Health-Monitoring-App-Using-UAV

Repository files navigation

🚁 UAV Image Analysis System

A comprehensive Streamlit web application for processing and analyzing UAV-captured aerial imagery. This system provides advanced image processing capabilities for agriculture, forestry, and environmental monitoring.

🌟 Features

πŸ–ΌοΈ Image Stitching

  • Combine multiple aerial images into seamless panoramas
  • Automatic image alignment and blending
  • Post-processing for optimal results

🌳 Tree Counting

  • Automatic detection and counting of trees in aerial imagery
  • Adjustable parameters for different tree sizes
  • Visual highlighting of detected trees

πŸ“ Area Detection

  • Identify and map crop areas and vegetation zones
  • Contour detection and bounding box calculation
  • Area quantification and mapping

🦠 Disease Detection

  • Detect plant diseases and health issues
  • Adjustable color range detection
  • Morphological processing for accurate detection

πŸ“Š Object Counting

  • Count various objects and features in images
  • Green object detection and filtering
  • Customizable area thresholds

πŸ“ˆ Results Dashboard

  • Comprehensive analysis and reporting
  • Processed image gallery
  • Download functionality for results

πŸš€ Installation

  1. Clone or download the project

    # If using git
    git clone <repository-url>
    cd "Project UAV"
  2. Install Python dependencies

    pip install -r requirements.txt
  3. Run the Streamlit application

    streamlit run app.py
  4. Open your browser

    • The application will automatically open in your default browser
    • Default URL: http://localhost:8501

πŸ“‹ Requirements

  • Python 3.8 or higher
  • OpenCV 4.8.0 or higher
  • Streamlit 1.28.0 or higher
  • Other dependencies listed in requirements.txt

🎯 Usage Guide

Getting Started

  1. Open the application in your browser
  2. Navigate through the sidebar to access different features
  3. Upload images using the file uploaders
  4. Adjust parameters using the interactive sliders
  5. View results and download processed images

Image Stitching

  1. Go to "πŸ–ΌοΈ Image Stitching" page
  2. Upload multiple images (at least 2)
  3. Click "πŸ”„ Process Image Stitching"
  4. View the stitched panorama
  5. Save the result if needed

Tree Counting

  1. Go to "🌳 Tree Counting" page
  2. Upload a single image
  3. Adjust the "Minimum tree area" slider
  4. Click "🌳 Count Trees"
  5. View detected trees and count

Area Detection

  1. Go to "πŸ“ Area Detection" page
  2. Upload an image
  3. Click "πŸ“ Detect Areas"
  4. View detected areas and bounding boxes

Disease Detection

  1. Go to "🦠 Disease Detection" page
  2. Upload an image
  3. Adjust HSV color range sliders
  4. Set minimum and maximum disease area
  5. Click "🦠 Detect Diseases"
  6. View detected disease areas

Object Counting

  1. Go to "πŸ“Š Object Counting" page
  2. Upload an image
  3. Adjust minimum object area threshold
  4. Click "πŸ“Š Count Objects"
  5. View detected objects and count

πŸ“ Project Structure

Project UAV/
β”œβ”€β”€ app.py                 # Main Streamlit application
β”œβ”€β”€ requirements.txt       # Python dependencies
β”œβ”€β”€ README.md             # This file
β”œβ”€β”€ processed/            # Output directory for processed images
β”œβ”€β”€ area_detection/       # Area detection backend code
β”œβ”€β”€ count_trees/          # Tree counting backend code
β”œβ”€β”€ Count_new/            # Object counting backend code
β”œβ”€β”€ Image Stitching/      # Image stitching backend code
└── images_nadir_RGB/     # Sample UAV images

πŸ”§ Customization

Adjusting Parameters

  • Tree Counting: Modify the minimum area threshold for different tree sizes
  • Disease Detection: Adjust HSV color ranges for different disease types
  • Object Counting: Change area thresholds for different object sizes
  • Image Stitching: The algorithm automatically handles multiple images

Adding New Features

The modular structure allows easy addition of new image processing features:

  1. Add new processing functions
  2. Create new Streamlit pages
  3. Update the sidebar navigation
  4. Add new file uploaders and controls

πŸ› Troubleshooting

Common Issues

  1. OpenCV Installation Issues

    pip uninstall opencv-python
    pip install opencv-python-headless
  2. Streamlit Not Starting

    • Ensure all dependencies are installed
    • Check Python version compatibility
    • Verify file paths are correct
  3. Image Processing Errors

    • Ensure uploaded images are in supported formats (JPG, PNG)
    • Check image file sizes (very large images may cause memory issues)
    • Verify images are not corrupted
  4. Memory Issues

    • Process smaller images
    • Close other applications to free memory
    • Restart the Streamlit application

πŸ“Š Performance Tips

  • Use appropriately sized images for faster processing
  • Adjust parameters based on your specific use case
  • Process images in batches for large datasets
  • Monitor system resources during processing

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

πŸ“„ License

This project is open source and available under the MIT License.

πŸ†˜ Support

For issues and questions:

  1. Check the troubleshooting section
  2. Review the code comments
  3. Open an issue in the repository
  4. Contact the development team

🚁 UAV Image Analysis System - Advanced aerial image processing for agriculture, forestry, and environmental monitoring.

About

A comprehensive Streamlit web application for processing and analyzing UAV-captured aerial imagery. This system provides advanced image processing capabilities for agriculture, forestry, and environmental monitoring.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors