how to strengthen the image ?

조회 수: 1 (최근 30일)
kalaivaani
kalaivaani 2014년 2월 5일
댓글: kalaivaani 2014년 2월 6일
In a work that explained as "Image strengthening is done by setting pixel to 1 if five or more pixels in its 3-by-3 neighbourhood are 1's; otherwise, set the pixel to 0." I can't understand it how can i code this whether there is a command for this

채택된 답변

Jan
Jan 2014년 2월 5일
편집: Jan 2014년 2월 5일
I gather you are working with single channel black and white images, i.e. pixel values are either 0 or 1. In that case, what you describe could be coded as follows:
A = round( randn(100,100) ); % example b/w image
A_s = filter2( ones(3,3), A );
A_s = A_s >= 5;
  댓글 수: 1
kalaivaani
kalaivaani 2014년 2월 6일
thank you its working

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by