フィルターのクリア

How to find the neighbourhood of a pixel

1 回表示 (過去 30 日間)
Sivakumaran Chandrasekaran
Sivakumaran Chandrasekaran 2012 年 9 月 3 日
How to find a particular pixel and the neighbourhood of it?

回答 (1 件)

Andrei Bobrov
Andrei Bobrov 2012 年 9 月 4 日
編集済み: Andrei Bobrov 2012 年 9 月 4 日
try this code (need have Image Processing Toolbox)
I = rand(10) > .9 % initial array
out = imdilate(I,ones(3)) - I;
OR
out = bwmorph(I,'dilate')-I
OR
out = bwdist(I,'chessboard') == 1;

カテゴリ

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