can any one help me to implement this matlab code

1 Ansicht (letzte 30 Tage)
Pamela Paolo
Pamela Paolo am 24 Okt. 2012
Bearbeitet: Walter Roberson am 28 Dez. 2017
Hi,
I need your help please to implement a matlab code for Edge drawing Edge Drawing works on grayscale images and is comprised of 4 steps:
(1) Suppression of noise by Gaussian filtering,
(2) Computation of the gradient magnitude and edge direction maps,
(3) Extraction of the anchors (peaks of the gradient map),
(4) Linking of the anchors by smart routing to compute the final edge map.
This is a link that can explain the method.
thanks
  7 Kommentare
Pamela Paolo
Pamela Paolo am 25 Okt. 2012
Bearbeitet: Walter Roberson am 28 Dez. 2017
thanks for your reply
I=imread('image.png');
figure;imshow(I);
I2=rgb2gray(I);
figure;imshow(I2);
H = fspecial('gaussian');
I3 = imfilter(I2,H,'replicate');
figure;imshow(I3);
I3 = single(I3)
imgrad = gradient(I3);
figure;imshow(imgrad);
But i have this result
with this image
Thien Thu Ngo
Thien Thu Ngo am 28 Dez. 2017
Hi @Pamela Paolo , could you please share with me the C++ code of this paper? Thanks a lot.

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Pamela Paolo
Pamela Paolo am 25 Okt. 2012
What is the purpose of casting I3 to single?? becuse i haven't a good result of gradient
  2 Kommentare
Image Analyst
Image Analyst am 26 Okt. 2012
I haven't run your code but when it says " Integers can only be combined with integers of the same class, or scalar doubles." it means that it's trying to do something with your integer array, like combine it somehow with a single or double array, and that is against MATLAB's rules. There is no such rule with singles and doubles combining with each other so that's why I said to cast it to single.
Pamela Paolo
Pamela Paolo am 26 Okt. 2012
Bearbeitet: Pamela Paolo am 26 Okt. 2012
Thanks for your reply
Have you an idea about the programming of these steps with matlab:
-edge direction maps
-extraction of the anchors
-linking of the anchors by smart routing to compute the final edge map.

Melden Sie sich an, um zu kommentieren.


Pamela Paolo
Pamela Paolo am 29 Okt. 2012
Hi
To find the gradient can i use
serl=[1 1 1,1 1 1, 1 1 1 ];
image1=imdilate(I3,serl);
image2=imerode(I3,serl);
grad=image1-image2;
what are the matlab functions used to program these steps:
-edge direction maps
-extraction of the anchors
-linking of the anchors by smart routing to compute the final edge map.
  3 Kommentare
Pamela Paolo
Pamela Paolo am 31 Okt. 2012
Hello
I have only this link http://ceng.anadolu.edu.tr/CV/EdgeDrawing/. I haven't more details. That is why I asked the question. thanks
I=imread('image.png');
figure;imshow(I);
I2=rgb2gray(I);
figure;imshow(I2);
H = fspecial('gaussian');
I3 = imfilter(I2,H,'replicate');
figure;imshow(I3);
I3 = single(I3)
imgrad = gradient(I3);
figure;imshow(imgrad);
Pamela Paolo
Pamela Paolo am 1 Nov. 2012
Hello,
I need your help to understand these steps
-Computation of the gradient magnitude and edge direction maps,
-Extraction of the anchors (peaks of the gradient map),
-Linking of the anchors by smart routing to compute the final edge map.
It's correct to do this to compute the gradient magnitude and edge direction maps?
[Gmag,Gdir] = imgradient(I3)

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by