This repository aims to perform edge detection using the Sobel filter. The Sobel filter is a commonly used technique in image processing for edge detection.
The Sobel filter is a gradient filter used to detect edges in an image. It analyzes the intensity changes at each pixel of the image to identify edges. The Sobel filter is calculated as a combination of gradients in the x and y directions, and then the edge strength is determined using the magnitudes of these gradients.
-
Downloading the Code: Clone this repository to your local machine or download it as a ZIP file.
-
Installing Required Libraries: To run the project, you'll need the OpenCV library. If you don't have OpenCV installed, you can follow the installation instructions from the official OpenCV website.
-
Running the Code: Execute the Python file
sobel_edge_detection.py
to perform edge detection using the Sobel filter. To detect edges in a sample image using the Sobel filter, run the following command:python sobel_edge_detection.py --input image.jpg --output edges.jpg
Here,
image.jpg
represents the input image for edge detection, andedges.jpg
represents the output image where the detected edges will be saved.