Finding the Edges (Sobel Operator) - Computerphile

Computerphile · 555K views · 2015 · 7:46

Open on YouTube

Computer vision, speech & NLPAlgorithms & data structuresexplainer

Why Stack Overflow recommends it

Stack Overflow users link it when asking or answering image-processing questions about Sobel edge detection, gradient direction and how to reproduce its output in OpenCV.

Recommended by 0 people across 0 different months, 2016 to 2018.

What it is

A Computerphile explainer in which image analyst Dr Mike Pound shows how computers find edges in images using the Sobel operator, a convolution that estimates horizontal and vertical gradients. It includes a demo with example code and a visualization of gradient direction.

What people said

Cites space_voyager · 2016-12 · Stack Overflow · on “Map angle to RGB color”

This video [this video] shows what I think is a great visualization of gradient angle by mapping angle (in [-pi,pi]) to RGB color: [LINK] I would like to know if it is possible in OpenCV C++ to map a floating point value angle , whose range is -M_PI to M_PI , to an RGB value in some preset colorwheel. Thank you!

Cites rafaelvalle · 2017-06 · Stack Overflow · on “AI Neural Network Wrong Handwritten Digit Prediction due to inverted color. Octave/Matlab?”

@HNLearner Note that edge detection algorithms usually are a combination of applying (convolution) a square Gaussian filter to blur the image and then some other filter, e.g. Laplacian or Sobel, to find the edges. [this video]

Cites Trevor · 2018-10 · Stack Overflow · on “How to detect edges, the orientation of edges and separate each distinct edge for further individual processing”

So I have physical folders that have features on the edges that I want to process. My first challenge here would be to isolate each individual folder. I found this video on Sobel Edge Detection [this video] that includes example C# code that produces this result: [LINK] It quite reliably finds the right side of each folder as red and left as green. What I need help with is: How do I produce a similar result in opencv. This can find any edge and show which direction they point. All I can find for sobel in opencv are ones that either do x or y. Using this data how can I segment out each folder without it breaking into pieces or accidentally getting parts of adjacent folders. As you can see they can