move a 3*3 window on a binary image

3 ビュー (過去 30 日間)
atefeh gh
atefeh gh 2014 年 9 月 3 日
コメント済み: Image Analyst 2014 年 9 月 5 日
hi I have a 3*3 window and a binary image..I want to move this window on this image... how can do this? thanks
  1 件のコメント
David Young
David Young 2014 年 9 月 3 日
What operation do you want to carry out?

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

回答 (2 件)

Image Analyst
Image Analyst 2014 年 9 月 3 日
Try imfilter(), conv2(), or nlfilter(), or possibly blockproc(). That's about all I can say until you provide more information.
  17 件のコメント
atefeh gh
atefeh gh 2014 年 9 月 5 日
so is there any Differences between what you say and this:
t1=1/9*[1 1 1;1 1 1;1 1 1];
t2=imfilter(binaryimage,t1);
like that Joseph said...am I right or not?
thanks Image Analyst
Image Analyst
Image Analyst 2014 年 9 月 5 日
I think that should be the same. Sometimes there are weird things about keeping classes the same so you'd need to check that. For example t2 mgiht be uint8 instead of double and thus not show fractional numbers but just round to 0 and 1. If that happens, just cast to double before sending in to imfilter.

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


atefeh gh
atefeh gh 2014 年 9 月 3 日
thanks David and Image Analyst I think I can do this by blockproc...I saw in help this: B = blockproc(A,[M N],FUN)
I want to explain the work that I want to do: I should apply 3*3 window based on this: if pexels located on two oposite sides of window have similar logical values(e.g,zero) all pixels covered by this window will be converted to that logical value(e.g,zero)
I want to know Is there any function can halep me to apply my work?? I hope I could explain my work to you.. Thanks in advance

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by