Structural similarity for RGB image

조회 수: 16 (최근 30일)
MD RESHAD UL HOQUE
MD RESHAD UL HOQUE 2019년 5월 17일
답변: D.Regan 2021년 12월 1일
I want to calculate the structural similarity between two RGB images. I was using Matlab built-in command ssim but got an error message.
Is there anything I need to do or other command for RGB image structural similarity??
My attempts and error message :
ssim(image11,a1) %% image11, a1 two RGB image. Image dimension 256x256x3
"Error using conv2
N-D arrays are not supported.
Error in filter2 (line 59)
y = conv2(hcol, hrow, x, shape);
Error in ssim (line 188)
mu1 = filter2(window, img1, 'valid');

답변 (2개)

vidhathri bhat
vidhathri bhat 2019년 5월 28일
Hi,
ssim function in matlab does not support RGB images. You will have to convert both images to greyscale image.

D.Regan
D.Regan 2021년 12월 1일
Hello,
SSIM is not intended to RGB images directly. To calculate SSIM here, convert RGB to YCbCr then follow the 0.8SSIMY + 0.1SSIMCr + 0.1SSIMCb.
For Ref:
Hope this will help you better.

카테고리

Help CenterFile Exchange에서 Get Started with Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by