Grey Level Histogram of IMAGE

2 ビュー (過去 30 日間)
Algorithms Analyst
Algorithms Analyst 2012 年 10 月 17 日
Can any one tell me how to calculate the grey level histogram of image without using direct function in matlab imhist?

採用された回答

Image Analyst
Image Analyst 2012 年 10 月 17 日
Loop over every pixel. For each pixel, get the gray level. The gray level is an index to your "counts" array. Increment that element by one. Details are left up to you.
  4 件のコメント
Image Analyst
Image Analyst 2012 年 10 月 17 日
The gray level is the array's value. No need for B. I should be called rgbImage to be more clear and help distinguish I from l and 1, which are hard to tell apart in most fonts. Use grayImage instead of A - again because it's a much more clear and descriptive variable name.
grayImage = rgb2gray(I);
for column = 1 : N
for row = 1 : M
grayLevel = grayImage(row, column);
See if you can take it from there...
Algorithms Analyst
Algorithms Analyst 2012 年 10 月 18 日
Tyhank you very much for your help...

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeHistograms についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by