Borrar filtros
Borrar filtros

What is the difference between functions imhist and hist?

3 visualizaciones (últimos 30 días)
Please anyone tell me the difference between functions imhist and hist. Can't we use function 'hist' for finding histogram of an image? If not, why?

Respuesta aceptada

Youssef  Khmou
Youssef Khmou el 4 de Mayo de 2014
Editada: Youssef Khmou el 4 de Mayo de 2014
Imhist function is designed to work with images which can have different numeric types such as uint8, uint16, while hist is for other numeric data. In terms of functionality, hist is general function and imhist is for special case of images. here is an example for comparison :
I=im2double(imread('circuit.tif'));
F=hist(I(:),500);
figure; plot(F)
F2=imhist(I,500);
figure; plot(F2)
% This example needs adjustment of the x axis ...

Más respuestas (0)

Categorías

Más información sobre Histograms en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by