Getting values of the histogram without actually plotting it

Hello, I am working on automatically adjusting the threshold for an image. How do I select a particular percentage of the peak of the histogram for thresholding without actually plotting the values. The image below was plotted using histogram(Image).

답변 (1개)

the cyclist
the cyclist 2018년 8월 30일

2 개 추천

Sounds like you need the histcounts command.

댓글 수: 3

how to select particular percentage of peak for thresholding using this command
The histcounts command
N = histcounts(X);
outputs the bin counts, without plotting them.
You could find the maximum value of this
maxN = max(N);
and then set your threshold as some percentage of this maximum value.
thats a great idea indeed

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

카테고리

도움말 센터File Exchange에서 Histograms에 대해 자세히 알아보기

질문:

2018년 8월 30일

댓글:

2018년 9월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by