How to use built-in entropy function
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Mustafa Uysal
el 24 de Dic. de 2019
Comentada: Mustafa Uysal
el 3 de Feb. de 2020
Hi,
i would like to calculate entropy of an image using entropy function. when use this function like this
E = entropy(uint8(output_image)
i can see a value. But when i remove uint8, i see 0 as a result. type of output_image is double. Also when i try to calculate entropy like described in this link
E = -sum(histogram_of_output_image.*log2(histogram_of_output_image));
i see NAN (not a number) as a result
2 comentarios
Respuesta aceptada
Subhadeep Koley
el 1 de Feb. de 2020
Hi, Can you attach your "output_image" ? So that we can reproduce the issue.
Otherwise you can try the code below.
E = entropy(uint8(rescale(output_image, 0, 255)))
Más respuestas (0)
Ver también
Categorías
Más información sobre Image Processing Toolbox en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!