File size: 1,475 Bytes
9354dd4
b836006
9354dd4
b836006
 
 
3b47e1f
b836006
 
9354dd4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
title: Geometric Shape Detection
emoji: 🐢
colorFrom: indigo
colorTo: purple
sdk: gradio
sdk_version: 5.38.0
app_file: app.py
pinned: false
---

# 🔺 Geometric Shape Detection

An intelligent computer vision application that automatically detects and classifies geometric shapes in images using advanced OpenCV algorithms and an intuitive Gradio interface.

## 🚀 Try It Out

Upload any image containing geometric shapes and watch as the AI identifies:
- **Triangles** (3 vertices)
- **Squares** (4 vertices, equal sides)  
- **Rectangles** (4 vertices, different sides)
- **Circles** (curved shapes with >6 approximated vertices)

## ✨ Key Features

- 🎯 **Instant Detection**: Real-time shape identification upon image upload
- 📊 **Detailed Analytics**: Get shape count, area measurements, and coordinates
- 🎨 **Visual Annotations**: Clear highlighting of detected shapes with labels
- 📱 **Mobile Friendly**: Responsive design that works on all devices
-**Fast Processing**: Optimized OpenCV algorithms for quick results

## 🛠️ How It Works

The application uses a sophisticated computer vision pipeline:

1. **Preprocessing**: Converts to grayscale and applies Gaussian blur for noise reduction
2. **Edge Detection**: Canny algorithm identifies shape boundaries (thresholds: 50-150)
3. **Contour Analysis**: Finds and filters significant contours (minimum 500px² area)
4. **Shape Classification**: Analyzes vertex count and aspect ratios: