Changing width of imhist bins

조회 수: 6 (최근 30일)
chess
chess 2014년 7월 18일
댓글: Image Analyst 2014년 7월 20일
Hi After issuing histeq my histogram is very spread. it is more like bunch of lines with very small width. I would like to know is there any way to increase width of each bins in histogram command imhist.

채택된 답변

Image Analyst
Image Analyst 2014년 7월 18일
The second argument is the number of bins, which essentially means the bin width.
  댓글 수: 2
chess
chess 2014년 7월 19일
I meant the width of each line not the distance between them, the second argument of imhist is 'n' which tells you how many lines you want to see.
Image Analyst
Image Analyst 2014년 7월 20일
Get your histogram with imhist()
[counts, grayLevels] = imhist(grayImage, 256);
Then plot with thick bars (width of 1)
bar(grayLevels, counts, 'BarWidth', 1);

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

추가 답변 (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