Median gray level value
이전 댓글 표시
Hi there,
How can I find the median gray level of non-zero valued pixels in an image?
I am working on mammograms that have lot of zero valued pixels, but it dosent matter.
Thanks
채택된 답변
추가 답변 (1개)
Image Analyst
2011년 11월 25일
Use logical indexing. See this demo:
% Generate some sample data.
A = [1 2 4 4; 3 0 6 6; 5 0 8 8; 5 6 8 0]
% Just FYI, let's see what we're going to use
AZ = A > 0
% Normal median value
medianValue = median(A(:))
% Now get the median of where A>0
medianValue = median(A(A>0))
카테고리
도움말 센터 및 File Exchange에서 Image Category Classification에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!