Re: Sobel operator implementation



On Sep 2, 11:52 pm, jogging <joggings...@xxxxxxxxx> wrote:
Hi,all
   I have a question about the implementation of sobel operator.
We know sobel operator is usually used to compute the gradient
of an image. In its definition the gradient magnitude is the
square root of the sums of Gx and Gy which Gx and Gy are gradient
in x direction and in y direction each.
The square root calculation is slow, especially in embedded
application.
Instead the output is the sum of the absolute values of Gx and Gy,then
the output is clamped to 8-bit range.
I don't know what influence the change can bring?

Thanks
Jogging

Is your question about the Sobel operator or gradient magnitude?
Depending on the application, there certainly are better ways to
calculate gradient magnitude than using the sobel operator.

1. Consider pixel luminances with spatial positions (i,j), (i+1,j),
(i,j+1), and (i+1,j+1)

a b
c d


an accurate estimate of of the gradient magnitude at position (i+0.5, j
+0.5) is

sqrt( (a-d)*(a-d) + (b-c)*(b-c) )/sqrt(2)

This (or the quantity before taking the square root) can be smoothed
and/or interpolated at positions (i,j) in an image.

2. Consider pixel luminances with spatial positions (i,j), (i+1,j),
(i,j+1), (i+1,j+1), (i-1,j), (i,j-1), (i-1,j+1) , (i+1,j-1),
(i-1,j-1):

a b c
d e f
g h l

A fast estimate of the gradient magnitude at (i,j) is

Max( |d-e|, |f-e|, |h-e|, |b-e|, Max( |a-e|, |c-e|, |l-e|, |g-e| )/sqrt
(2) ).

This is based on the fact that, for an analytic function, the gradient
magnitude is invariant to rotation and, therefore equal to the maximum
magnitude of the directional derivatives.

Again, this can be smoothed.
.



Relevant Pages

  • Re: Help solving a bounded linear-least squares problem.
    ... >the distance between each point and its corresponding target position. ... >> you can read off from the sign of the gradient what to do: ... >the BVLS active set strategy to determine which variable most wants to ... >of greatest gradient magnitude to smallest gradient magnitude, ...
    (sci.math.num-analysis)
  • Re: Sobel operator implementation
    ... We know sobel operator is usually used to compute the gradient ... The square root calculation is slow, ... Yeah the thresholding might not be linear as compared ...
    (sci.image.processing)
  • Re: Sobel operator implementation
    ... We know sobel operator is usually used to compute the gradient ... I don't know what influence the change can bring? ... *reads* like a class assignment. ...
    (sci.image.processing)
  • Re: Sobel operator implementation
    ... I have a question about the implementation of sobel operator. ... We know sobel operator is usually used to compute the gradient ... I've always used --- almost unquestioningly for I started image processing when a multiply was a big deal. ... Much better to use some floating point type throughout --- if you can afford the memory; maybe some embedded processors have a penalty for floating point arithmetic? ...
    (sci.image.processing)
  • Re: Sobel operator implementation
    ... I have a question about the implementation of sobel operator. ... We know sobel operator is usually used to compute the gradient ... square root of the sums of Gx and Gy which Gx and Gy are gradient ... The square root calculation is slow, ...
    (sci.image.processing)

Quantcast