フィルターのクリア

Smoothing the edges of an image

2 ビュー (過去 30 日間)
David Dijemeni
David Dijemeni 2011 年 12 月 4 日
I have detected different parts of an MRI scan but the edges of the detected part is very rough in some places. How can I smoothen the edges of the detected part?

採用された回答

David Young
David Young 2011 年 12 月 4 日
If you use the edge() function, try the 'canny' option and adjust the sigma parameter to give edges as smooth as you need them.
  1 件のコメント
David Dijemeni
David Dijemeni 2011 年 12 月 4 日
This gives me the result I wanted to a good approximation. Thanks David!

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

その他の回答 (1 件)

Image Analyst
Image Analyst 2011 年 12 月 4 日
You can smooth a list of coordinates by using conv(xCoords, ones(1,WindowSize)/windowSize) - similar for the y coordinates. You just average together a section of the curve. You need to do a little fixing at the beginning and end of the array to handle wrap around, but that's not hard. This will give you smoothed shaped - the bigger the blurring window the smoother the shape is.
I'm using this method now in one project. Actually I wanted to smooth inward incursions only, not outward protuberances so I OR'ed with the original (gotten by using poly2mask).
There are other ways to smooth it, such as by using imclose, blurring your image before edge detection, etc. Results depend on your image so you might experiment with different methods to see which one delivers the appearance you're seeking.
  1 件のコメント
David Dijemeni
David Dijemeni 2011 年 12 月 4 日
The solution given by David works but I would try your methods.
Thanks for the answer.

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

カテゴリ

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