# Interpreting results of Sobel Edge Detection

I am implementing A No-Reference Perceptual Blur Metric paper.

Somewhere in the prep steps they mention the use of vertical Sobel filter for finding vertical edges.

The algorithm is summarized in Fig. 1. First we apply an edge detector (e.g. vertical Sobel filter) in order to find vertical edges in the image. We then scan each row of the image1.

I am using scipy.ndimage.sobel(y, axis=1) on Y component of the image as suggested in the paper. But to be honest I don't know how should I interpret this output to decide if there is an edge in this area or not.

Basic idea of the solution from the paper is summarised in this graph:

So I think I understand how to calculate the edge width using the algorithm but to be able to do that I need to know the location for the green dashed line. I think this is what Sobel filter gave them or interpreting the results of scipy.ndimage.sobel(y, axis=1) will give me.

How will I be able to identify the locations of green dashed lines from the output of scipy.ndimage.sobel(y, axis=1).

• Welcome to SE.SP! I can't really see how they're getting the green "edge locations". But do you really need them? The algorithm just seems to need the start and end of the edges (the P2 and P2' locations), which seem straightforward to find.
– Peter K.
Jun 20, 2022 at 2:02
• Hello! I guess that would work. It would just increase the number of computations - for the section from the screenshot it would go from 4 to 10 since we would always have to consider edge is between minima and maxima. That would include calculating a lot of noise - like pixels 175 - 180 from a screenshot. Maybe we can introduce some thresholding? I did a lot of research on Sobel filter this weekend. Usually you calculate both dx and dy and take magnitude, threshold that and based on it you decide if it is an edge or not. Maybe I can do this. But anyway it will no longer be the paper solution. Jun 20, 2022 at 8:02
• Or maybe it will be since paper aim at assessing blueness via width of the edge so how I arrive at the edge location is not relevant. Jun 20, 2022 at 8:04