フィルターのクリア

how we can imfill a thing that it is very similar to a hole but in fact it is not a hole?

3 ビュー (過去 30 日間)
sara
sara 2014 年 9 月 14 日
コメント済み: Image Analyst 2014 年 9 月 25 日
how we can imfill a thing in an binary image that it is very similar to a hole but in fact it is not a hole?
I attached a simple image that in the left side there is a thing that looks like a hole but it is not a hole
  4 件のコメント
Sean de Wolski
Sean de Wolski 2014 年 9 月 25 日
Well there might be a better method than otsu; post the pre-otsu image
Image Analyst
Image Analyst 2014 年 9 月 25 日
Sean, it's been posted before. Unfortunately she's carrying on this discussion in 4 or 5 different discussions. Last I left it, I showed her how to use activecontour: http://www.mathworks.com/matlabcentral/answers/155374#comment_238290

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

回答 (2 件)

Matt J
Matt J 2014 年 9 月 14 日
編集済み: Matt J 2014 年 9 月 14 日
Use imclose either to seal it, or to turn it into a hole which can then be treated with imfill.
  3 件のコメント
sara
sara 2014 年 9 月 25 日
yes Matt
I tried this before but my result was not good ... thanks a lot
Matt J
Matt J 2014 年 9 月 25 日
You could also use regionprops or bwconncomp to separate the lungs in two separate images. Then you could imclose with the original strel that was working well. Then you recombine the images.
It would also be worth attaching the challenging black and white lung image in a .mat file, so that other people can play with it.

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


Image Analyst
Image Analyst 2014 年 9 月 14 日
Like I said in the discussion that was this first part of this question before you started this one, you can use activecontour(). See attached demo. If you can't figure how to adapt the demo, let me know. Either way, with imclose() or activecontour(), it will smooth out the perimeter and snip off that bay/incursion.
  11 件のコメント
Image Analyst
Image Analyst 2014 年 9 月 17 日
You can use imfreehand() to manually draw a line across it. Any other way will end up filling in or smoothing other little nooks and crannies at other places along the perimeter.
sara
sara 2014 年 9 月 24 日
thanks Image Analyst I cant do it manually... you said :"Any other way will end up filling in or smoothing other little nooks and crannies at other places along the perimeter" do you mean using imclose() or smoothing filter?? can you explain it more??
thanks a lot

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

Community Treasure Hunt

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

Start Hunting!

Translated by