Skip to content

This repository contains MATLAB implementations for edge detection techniques, including Prewitt and Sobel operators. Additionally, it demonstrates the effect of applying a smoothing (averaging) filter before edge detection using the Sobel operator. The objective is to compare these methods for detecting edges in grayscale images.

Notifications You must be signed in to change notification settings

RAHULPATEL2002/Finding_The_Edges

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Finding the Edges

AIM

For a color image, convert RGB to Grayscale and find the edges using the following operators:

  1. Prewitt Operators.
  2. Sobel Operators.
  3. Use of a smoothing filter (averaging filter) with the Sobel operator.

Features

This MATLAB script performs the following tasks:

  • Converts a color image to grayscale.
  • Detects edges using Prewitt and Sobel operators.
  • Applies a smoothing filter before Sobel edge detection.
  • Allows users to upload an image interactively for processing.

How to Use

  1. Clone or download this repository to your local system.
  2. Ensure MATLAB (R2020b or later) and the Image Processing Toolbox are installed.
  3. Run the script edge_detection.m in MATLAB.
  4. When prompted, select an image file to process (supported formats: .jpg, .png, .bmp).

Prerequisites

  • MATLAB R2020b or later.
  • Image Processing Toolbox.

Instructions

  1. Save the file as edge_detection.m.
  2. Run the script in MATLAB.
  3. Follow the prompts to upload an image for edge detection.

Example Results

Grayscale Image

Screenshot 2025-01-19 160613

Prewitt Edge Detection

Screenshot 2025-01-19 160638

Sobel Edge Detection

Screenshot 2025-01-19 160647

Smoothed Sobel Edge Detection

Screenshot 2025-01-19 160701


Author

Rahul Patel
Electronics and Communication Engineering Student
Date: January 19, 2025


About

This repository contains MATLAB implementations for edge detection techniques, including Prewitt and Sobel operators. Additionally, it demonstrates the effect of applying a smoothing (averaging) filter before edge detection using the Sobel operator. The objective is to compare these methods for detecting edges in grayscale images.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages