how to better improve my segmentation at the edges to get an image similar to the lesion
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Elias Unk
am 22 Apr. 2017
Bearbeitet: Elias Unk
am 24 Jun. 2017
As the title says and can be seen in the attached images,i'd like to improve the edges in the segmented pic and that can be done by getting a smoother more accurate mask.
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 22 Apr. 2017
"Smoother, more accurate" is an oxymoron don't you think? What's wrong with it the way it is?
There are several ways to smooth it, if you absolutely must. One way is to blur the binary mask and then threshold it. This will produce a smoother mask.
The other way is to smooth the outline coordinates with a spline. I'm attaching a demo for that method.
2 Kommentare
Image Analyst
am 22 Apr. 2017
A morphological operator like imclose() can be used but it won't give you as smooth an edge as blurring with conv2() or imfilter(). Morphological operators tend to have noticeable artifacts. Just try imclose() and you'll see.
se = strel('disk', 9, 0);
mask = imclose(mask, se);
versus
windowSize = 5;
kernel = ones(windowSize)/windowSize^2;
mask = conv2(double(mask), kernel, 'same');
mask = mask > 0.5;
The second code snippet will give you smoother edges.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Geometric Transformation and Image Registration finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!