Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

problem with ssim function

Asked by angel on 14 May 2013

i've divided the image into overlapping blocks and size of each block is 2x2. but when i used the ssim function it shows the result as

       -inf

why so?

like if

        a=[191 161;198 197]
        b=[201 191; 166 195]
       mssim=ssim(a,b);
       the result produced is -inf

plz help me to do so

0 Comments

angel

Tags

Products

No products are associated with this question.

1 Answer

Answer by Iman Ansari on 14 May 2013
Accepted answer

Hi. It's default window:

window = fspecial('gaussian', 11, 1.5);

If input images has smaller size than 11*11 (it's window size), the output became -Inf. You may change default window:

a=[191 161;198 197]
b=[201 191; 166 195]
K(1) = 0.01;					% default settings
K(2) = 0.03;					%
window = ones(2);
mssim = ssim(a,b, K, window);

0 Comments

Iman Ansari

Contact us