how to better improve my segmentation at the edges to get an image similar to the lesion

6 ビュー (過去 30 日間)
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.

採用された回答

Image Analyst
Image Analyst 2017 年 4 月 22 日
"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 件のコメント
Elias Unk
Elias Unk 2017 年 4 月 22 日
I do want my mask closer to the lesion area than the one i got with lots of ramifications on the edges,i just checked your code and thanks for attaching it but i had in mind some kind of morphological operator based way which would be simpler if you could suggest any
Image Analyst
Image Analyst 2017 年 4 月 22 日
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.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGeometric Transformation and Image Registration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by