필터 지우기
필터 지우기

Hoe to find histogram count

조회 수: 1 (최근 30일)
Chethan
Chethan 2013년 4월 16일
I'm working on CBIR using entropy, where entropy of an image can be calculated using formula -sum(p.*log2(p)). where 'p' defines histogram count of an image. MATLAB has an inbuilt command _histc_to find histogram count, and the syntax is histc(x,edge,dim) and I'm not getting what edge is, I've a bitmap image x for which i need to find histogram count. what is 'p' ? is it a vector or a matrix?

답변 (1개)

Image Analyst
Image Analyst 2013년 4월 16일
Then why not use imhist():
[pixelCount, grayLevel] = imhist(grayImage, 256);
With histc(), you have to define the edges and it bins everything in between the edges. The equivalent to imhist() might be
edges = -0.5 : 1.0 : 255.5; % Edges for a grayscale image.
[pixelCount, grayLevel] = histc(grayImage, edges);

카테고리

Help CenterFile Exchange에서 Data Distribution Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by