필터 지우기
필터 지우기

How to calculate the median and mode of an image from the histogram

조회 수: 7 (최근 30일)
I have used the following code to calculate the mode
[pixelCount grayLevels] = imhist(LBP_Im);
maximum=max(pixelCount);
r=find(pixelCount==maximum);
whether this is correct to calculate the mode. Likewise I wish to know the code for calculating the median of an image

채택된 답변

Guillaume
Guillaume 2015년 10월 1일
편집: Guillaume 2015년 10월 1일
Why not simply use the mode and median function?
imgmode = mode(LBP_Im(:));
imgmedian = median(LBP_Im(:));

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Filtering and Enhancement에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by