필터 지우기
필터 지우기

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 CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by