An open API service indexing awesome lists of open source software.

https://github.com/bpavan16/cv-labs

This repository includes the codes from the computer vision labs of my 5th-semester course, showcasing implementations of various topics.
https://github.com/bpavan16/cv-labs

computer-vision edge-detection implementation opencv python

Last synced: 3 months ago
JSON representation

This repository includes the codes from the computer vision labs of my 5th-semester course, showcasing implementations of various topics.

Awesome Lists containing this project

README

        

# Image Processing and Computer Vision Techniques

This repository contains Python implementations and comparative analyses of various image processing and computer vision techniques. The goal is to provide a comprehensive toolkit for analyzing, detecting, and processing features in images while comparing the performance of different algorithms.

## Table of Contents

- [Comparative Analysis of Edge Detection Methods](#comparative-analysis-of-edge-detection-methods)
- [RANSAC Implementation for Robust Linear Regression](#ransac-implementation-for-robust-linear-regression)
- [Harris Corner Detection](#harris-corner-detection)
- [Feature Matching Using RANSAC](#feature-matching-using-ransac)
- [Difference of Gaussians (DoG) Implementation](#difference-of-gaussians-dog-implementation)
- [Setup and Usage](#setup-and-usage)
- [Results](#results)
- [Contributing](#contributing)

---

## Comparative Analysis of Edge Detection Methods

### Description
A Python script to compare the performance of Gaussian, Sobel, and Canny edge detection methods on a given set of images. Metrics such as edge detection accuracy, computational efficiency, and noise robustness are measured and presented in a comparative analysis report.

### Features
- Implements Gaussian, Sobel, and Canny edge detection.
- Measures and compares:
- Edge detection accuracy.
- Computational efficiency.
- Noise robustness.
- Generates a detailed analysis report.

---

## RANSAC Implementation for Robust Linear Regression

### Description
A Python function to implement the RANSAC algorithm for robust linear regression. The function estimates the parameters of a linear model that best fits the inliers in a dataset with outliers.

### Features
- Implements the RANSAC algorithm.
- Works with synthetic datasets containing known outliers.
- Visualizes inliers, outliers, and the fitted linear model.

---

## Harris Corner Detection

### Description
A Python function to implement the Harris corner detection algorithm for identifying corner points in images.

### Features
- Detects corner points using the Harris corner detector.
- Supports images with varying corner densities.
- Visualizes detected corner points overlaid on the original images.

---

## Feature Matching Using RANSAC

### Description
An extended implementation of the RANSAC algorithm for feature matching between two images based on their local descriptors.

### Features
- Detects keypoints using the Harris corner detector.
- Uses SIFT descriptors for matching keypoints.
- Applies RANSAC to estimate the transformation matrix between matched keypoints.
- Visualizes matched features.

---

## Difference of Gaussians (DoG) Implementation

### Description
A Python function to compute the Difference of Gaussians (DoG) for a given input image. The function performs convolution of the image with two Gaussian kernels of different standard deviations and computes their difference.

### Features
- Computes DoG for images at different scales.
- Visualizes the resulting images to observe the effect of scale.

---

## Setup and Usage

### Prerequisites
- Python 3.7 or higher.
- Required libraries: `numpy`, `opencv-python`, `matplotlib`, `scikit-image`.

### Installation
1. Clone the repository:
```bash
git clone https://github.com/your-username/your-repo-name.git
cd your-repo-name
```
2. Install dependencies:
```bash
pip install -r requirements.txt
```

### Running the Code
- For edge detection analysis:
```bash
python edge_detection_comparison.py
```
- For RANSAC linear regression:
```bash
python ransac_regression.py
```
- For Harris corner detection:
```bash
python harris_corner_detection.py
```
- For feature matching using RANSAC:
```bash
python feature_matching_ransac.py
```
- For DoG implementation:
```bash
python difference_of_gaussians.py
```

---

## Results

Each script generates visualizations and analysis reports. These outputs include:
- Edge detection results and performance metrics.
- RANSAC regression plots with inliers and outliers.
- Images with detected corners overlaid.
- Matched keypoints between images.
- DoG results at various scales.

---

## Contributing

Contributions are welcome! If you have suggestions for improvement or new features, feel free to create a pull request or open an issue.

### Steps to Contribute
1. Fork this repository.
2. Create a feature branch:
```bash
git checkout -b feature-name
```
3. Commit your changes:
```bash
git commit -m "Description of changes"
```
4. Push to the branch:
```bash
git push origin feature-name
```
5. Create a pull request.

---

## License

This project is licensed under the MIT License. See the `LICENSE` file for more details.

---