필터 지우기
필터 지우기

Divide histogram in three parts

조회 수: 2 (최근 30일)
Nataliya
Nataliya 2017년 2월 28일
댓글: Walter Roberson 2017년 2월 28일
Hi, I want to divide the histogram in three parts and define the ranges of three parts.
minRed = min(red(:));
maxRed = max(red(:));
AvgRed = (minRed+maxRed)/3;
AvgRed2 = AvgRed+AvgRed;
But sometimes the value of AvgRed becomes less than minRed and value of AvgRed2 exceeds the maxRed. What is the correct way to do this?

채택된 답변

Walter Roberson
Walter Roberson 2017년 2월 28일
A + (B - A) /3
A + (B - A) /3 *2
  댓글 수: 2
Nataliya
Nataliya 2017년 2월 28일
Suppose minRed = 0.5459 and maxRed = 1. Your solution also gives AvgRed = 0.33 and AvgRed2 = 0.66. Issue still exists
Walter Roberson
Walter Roberson 2017년 2월 28일
1-0.5459 is 0.4541. Divide by 3 gives 0.15136. Add 0.5459 gives 0.69726.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Correlation and Convolution에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by