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.
Make sure Python is installed on your system.
if Python is not installed then use the following command lines to install for Ubuntu
apt update && apt upgrade -y
apt install python3.6
Also check if you have following packages installed on your system
cv2
numpy
if not, install using
pip install <package-name>
Change the directory to code and then execute below
Implementation without any direct API call : python SobelEdgeDetector.py
Input Image
Horizontal change
Vertical change
Sobel Operator applied to input Image
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