Skip to content

Instantly share code, notes, and snippets.

@jackparmer
Created August 14, 2021 00:14
Show Gist options
  • Save jackparmer/c80c8814ca1fe4c29900268e135e1601 to your computer and use it in GitHub Desktop.
Save jackparmer/c80c8814ca1fe4c29900268e135e1601 to your computer and use it in GitHub Desktop.
% Write MATLAB image
% saveas(gcf,'matlab_line1.png')
% Write Plotly image
% write_image(fig2plotly(gcf),'png', 'plotly_line1.png', 875, 1167, 1)
ref = imread('matlab_line1.png');
A = imread('plotly_line1.png');
figure()
montage({ref,A})
title('MATLAB Image (Left) vs. Plotly Image (Right)')
[ssimval,ssimmap] = ssim(A,ref);
figure()
imshow(ssimmap,[]);
title(['Local SSIM Map with Global SSIM Value: ',num2str(ssimval)])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment