Slope Magnitude Technique with Sobel Operator
5 views (last 30 days)
Show older comments
I have to extract shape by
Slope Magnitude Technique with Sobel Operator
Slope Magnitude Technique with canny Operator
Slope Magnitude Technique with roberts Operator
can anyone tell hoe to process
I have to extract the shape using three methods,i have posted for other three methods ,i colud not find any answer,else is there any methods other than these to extract shape
please help
0 Comments
Accepted Answer
David Young
on 6 Dec 2011
As Walter says, it's not clear what you mean by extracting shape. I'm also not sure whether you want help in implementing the three measures that you mention, or whether you want people to propose alternatives to them.
In case it helps, here is some information about obtaining the magnitude of the gradient of an image (which is what I guess you mean by slope magnitude). You can get orthogonal components of the gradient by convolution with differencing operators, such as the Sobel or Roberts operators. You can easily find the form of these simple operators (e.g. on Wikipedia) and then use conv2 to apply them to the image. By 'Canny operator' I think you probably mean the first derivative of the Gaussian, since that is what is used in the first stage of the Canny edge detector.
Here's an example of getting the square of the gradient magnitude using 'Canny' operators. I use this file exchange submission to do the convolutions.
im = double(imread('pout.tif'))/256;
>> [xg, yg] = gradients_xy(im, 5, false, [1 size(im,1) 1 size(im,2)]);
>> gsq = xg.^2 + yg.^2;
>> imshow(gsq, []);
The Roberts and Sobel methods are actually simpler, but as they have no smoothing they are likely to produce a noisy result on real images, and I'm not sure why you would want to use them.
EDIT I have changed and simplified the arguments for gradients_xy. If you download the function from the FEX after 8 Dec 2012, you should change the call above to:
[xg, yg] = gradients_xy(im, 5, 'same');
4 Comments
More Answers (1)
Walter Roberson
on 6 Dec 2011
You cannot extract the shape using those techniques, nor any of the techniques you posted about earlier. Referring to one of your earlier threads, it is meaningless to "indicate the shape" of a tree.
You can extract feature vectors and object metrics from images, but those are not the same thing as the "shape" of an object.
3 Comments
Walter Roberson
on 6 Dec 2011
You wrote: "in feature extraction of an image,one is shape". I have not found any evidence of that. What I do find evidence of is that one can extract feature descriptions *of* a shape -- not that one can extract the shape itself.
See Also
Categories
Find more on Computer Vision with Simulink in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!