Removing Values from Histogram

조회 수: 3 (최근 30일)
Vennila Gangatharan
Vennila Gangatharan 2012년 12월 22일
I want to remove gray levels of particular range from Histogram of an Image. Anyone Know how to do?
  댓글 수: 1
Matt J
Matt J 2012년 12월 22일
And replace them with what?

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

채택된 답변

Image Analyst
Image Analyst 2012년 12월 22일
Let's say you had a masked image where a huge number of pixels were black and this produced a big spike in the histogram at zero. You can suppress this by setting that bin to zero.
[pixelCount, grayLevels] = imhist(grayImage, 256);
% Suppress zero bin:
pixelCount(1) = 0;
% Now plot:
bar(grayLevels, pixelCount);

추가 답변 (0개)

카테고리

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