0
$\begingroup$

I have been reading this Wikipedia article: https://en.wikipedia.org/wiki/Roberts_cross

And it says this:

enter image description here

Now I have also been reading this for the Robert Cross operator (from Feature Extraction and Image Processing 3rd Edition):

enter image description here

I can understand The books explanation (kinda) but not wikipedia.

So in Code I will have something like this:

EdgeValue(at x,y) = Max[(Px+1,y - Px,y+1), (Px,y - Px+1,y+1)]

So from the 2 values I choose the max. And in the new image I just draw that value in x,y. Makes sense.

What I do not get is Wikipedia. Why does it go on finding the gradient? Also that looks like the Pythagorean Theorem not a gradient equation.

$\endgroup$
2
  • $\begingroup$ Shouldn't you take the max of the two absolute values? $\endgroup$ Aug 2, 2015 at 5:49
  • $\begingroup$ Would you please let me know what kind book do you have referenced? $\endgroup$
    – gmotree
    Aug 2, 2015 at 21:42

1 Answer 1

1
$\begingroup$

What I do not get is Wikipedia. Why does it go on finding the gradient?

You subtract two nearby pixel values. That is a gradient, or as close as you can get on a discrete image.

Also that looks like the Pythagorean Theorem not a gradient equation.

As the book text say, "it is often better to consider the two templates as providing the components of an edge vector". If you want the length of a vector, you use the Pythagorean Theorem.

The better question is: why use the max or the sum of the absolute values, or: what's the difference?

To show that, it's best to try the filter on a rotationally symmetric template:

enter image description here

that way, we can see how it acts on different edge angles:

enter image description here

As you can see, adding the absolute values of the gradient vector (this is sometimes called the "L1-Norm") gives larger edge strengths for horizontal and vertical edges than diagonal edges. Taking the max of the two absolute values of the gradient vector (also known as the "L-infinity Norm") gives slightly larger edge values for diagonal edges. Using the ordinary Euclidean norm (i.e. the Pythagorean Theorem) gives exactly the same edge strength for any angle, which is of course the right result.

The only downside (I'm aware of) is that this requires two multiplications and a square root for every pixel, which used to be very expensive operations when the Roberts operator was invented. They're still expensive on mobile or embedded platforms today, but on a PC, you might not even notice the difference.

$\endgroup$
2
  • $\begingroup$ So basically the roberts operator can be used with all those 3 methods you mention right? As long as you convolve the two operators separately with the iamge $\endgroup$
    – Trt Trt
    Aug 2, 2015 at 10:38
  • $\begingroup$ @TrtTrt: Of course. You can can use any method you like ;-) $\endgroup$ Aug 2, 2015 at 11:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.