This project is a web application built with Flask that performs Canny edge detection and Harris corner detection on uploaded images. Users can upload an image and specify parameters for the detection algorithms, and the processed image will be returned.
app.py
: Main application file containing the Flask server and route definitions.functions.py
: Contains custom functions for image processing including Canny edge detection and Harris corner detection.templates/
: Directory containing HTML templates.static/
: Directory containing JavaScript.
-
Clone the repository
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
-
Ensure you are in the project directory and the virtual environment is activated.
-
Run the Flask application:
python app.py
-
Open your browser and go to
http://127.0.0.1:5000/
.
/
: Renders the main HTML page where users can upload images and set parameters./upload
: Handles image uploads for Canny edge detection and returns the processed image./upload2
: Handles image uploads for Harris corner detection and returns the processed image.
For Canny edge detection:
lines
: Number of lines to detect.resolution
: Resolution for the Hough transform.image_data
: Base64 encoded image data.
For Harris corner detection:
Threshold
: Threshold value for corner detection.image_data
: Base64 encoded image data.
Converts an RGB image to BGR format.
Performs Harris corner detection on the input image.
Performs Hough line detection on the input image.
Transforms detected lines back to image space and overlays them on the original image.
- Flask
- OpenCV
- NumPy
- PIL (Pillow)
- SciPy
Name | GitHub | |
---|---|---|
Omar Adel Hassan | @Omar_Adel | |
Sharif Ehab | @Sharif_Ehab | |
Mostafa Khaled | @Mostafa_Khaled | |
Bahey Ismail | @Bahey_Ismail |