필터 지우기
필터 지우기

Grey Level Histogram of IMAGE

조회 수: 6 (최근 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 CenterFile Exchange에서 Histograms에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by