I want to measure entropy and PSNR to N number of images
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Abdullah
el 23 de Abr. de 2017
Editada: Image Analyst
el 23 de Abr. de 2017
clc
clear all
srcFiles = dir('----\*.jpg'); % the folder in which ur images exists
for i = 1 : length(srcFiles)
filename = strcat('----',srcFiles(i).name);
I = imread(filename);
end
E = entropy(I);
It returns to me one value only.
0 comentarios
Respuesta aceptada
Image Analyst
el 23 de Abr. de 2017
Editada: Image Analyst
el 23 de Abr. de 2017
Yes that's true. You're only calling it on the very last image you read in. If you want a value for every image, put it in the loop and index it.
for i = 1 : length(srcFiles)
filename = strcat('----',srcFiles(i).name);
I = imread(filename);
E(i) = entropy(I);
end
If you want a value for every pixel in the image, use entropyfilt() instead of entropy().
entropyImage{i} = entropyfilt(I);
You can compute PSNR with the Image Processing Toolbox function called psnr().
0 comentarios
Más respuestas (0)
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!