Skip to content

Latest commit

 

History

History

EdgeDetection

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Sobel Edge Detection

Summary

Sobel Operator or Sobel Filter, is used in computer vision for edge detection. It is a 3x3 image gradient operator when convolving on the image gives image derivatives for horizontal change and for vertical change.

Installation

Make sure Python is installed on your system.
if Python is not installed then use the following command lines to install for Ubuntu

  1. apt update && apt upgrade -y
  2. apt install python3.6

Also check if you have following packages installed on your system

  1. cv2
  2. numpy
    if not, install using
    pip install <package-name>

Execute

Change the directory to code and then execute below
Implementation without any direct API call : python SobelEdgeDetector.py

Result

Input Image
Input Image

Horizontal change
along y

Vertical change
along x

Sobel Operator applied to input Image
result

Image Credit

By Simpsons contributor, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=8904364
More details: https://en.wikipedia.org/wiki/Sobel_operator