edit-calculating PSNR

10 visualizaciones (últimos 30 días)
kash
kash el 22 de Mzo. de 2012
As in my previous post
MSE = mean2((single(image1) - single(image2)).^2);
i get error,matrix dimension must agree,please help

Respuesta aceptada

Walter Roberson
Walter Roberson el 22 de Mzo. de 2012
MSE is not defined in that situation.
MSE is only define between a reference image and an altered version of the image of the same size.
If you were to "decompress" the wavelets back to a full sized image, then it would be meaningful to calculate the MSE between the original image and the one produced by the compression + decompression process.

Más respuestas (1)

Image Analyst
Image Analyst el 22 de Mzo. de 2012
"Matrix dimension" basically means the size of your image. Your images must both be of the same size, not just laterally but also in the number of colors. So you can't subtract a grayscale image from a color one or vice versa. Do this and see what it says:
[rows1 columns1 numberOfColorChannels1] = size(image1)
[rows2 columns2 numberOfColorChannels2] = size(image2)
  2 comentarios
kash
kash el 22 de Mzo. de 2012
[ca1,ch,cv,cd] = dwt2(y1,'haar');
i want to find mse between,y1 and ca1;
the size of y1 is 240x320
soze of ca1 is 120x160
Image Analyst
Image Analyst el 22 de Mzo. de 2012
Well there you go. Matrix dimensions are not the same, just like it said. Plus, like Walter said, this is not really meaningful (assuming you resized them to match) since of course you know you will get a big number because it's a low pass version of the original image. Nothing really surprising there, or worth measuring I don't think.

Iniciar sesión para comentar.

Categorías

Más información sobre Denoising and Compression 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