How to check neighbouring elements in a 2D array
이전 댓글 표시
I have a 2D array (~1000x1000) of intensity values that I would like to transform into an image to use as a mask for data processing in another program. I would like to mask out the dark lines and the corners:

What I am thinking is that for each element in the array, the neighbouring values (e.g. in a set radius) are checked for the proportion of zero values. If the proportion of zero values is above a set threshold, it should return a zero and otherwise it should return a one.
Happy to hear suggestions about other ways of going about this, and thank you in advance.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Display Image에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

