필터 지우기
필터 지우기

Hello I need a code that gives me the local minimum of a histogram please ?

조회 수: 2 (최근 30일)
I created 12 histograms for 12 frames and I need to get the local minimums of these histograms.

답변 (1개)

Mathieu NOE
Mathieu NOE 2022년 4월 21일
hello
maybe this
the local minima are the red diamonds
x = randn(1000,1);
h = histogram(x);
Values = h.Values;
BinCounts = h.BinCounts;
BinEdges = h.BinEdges;
BinWidth = h.BinWidth;
centers = BinEdges(2:end) - BinWidth/2;
% find min values
ind = islocalmin(Values);
hold on
plot(centers(ind),Values(ind),'dr');
hold off
  댓글 수: 12
Image Analyst
Image Analyst 2022년 5월 9일
So the "why you need it" is a closely held secret? You basically said you need it because you need it. Let me challenge you and say that you don't need it to do whatever mysterious thing you're attempting to do. Prove me wrong.
Anyway you can use imregionalmin and imregionalmax to find min and max locations in a signal.
AbdelRahman Mostafa
AbdelRahman Mostafa 2022년 5월 10일
I am a masters student and my thesis is about image processing. I just needed to know how to get the local minimums to be able to continue my thesis. Now you know why I need it. If you can help good if you cant then dont talk to me that way. Thank you

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by