资源简介
基于Matlab的SSIM算法实现(源码+注释,直接运行),其中包括输入3维图像运行出错的修改,还有源码中部分参数,格式不正确的修改,直接运行出结果。PS:网上一些源码说可以直接运行,实则Copy,并没有修改,深受其害,所以今天索性做了个修改完整版供大家分享。
代码片段和文件信息
function [mssim ssim_map] = ssim(img1 img2 K window L)
clc;
% ========================================================================
% SSIM Index with automatic downsampling Version 1.0
% Copyright(c) 2009 Zhou Wang
% All Rights Reserved.
%
% ----------------------------------------------------------------------
% Permission to use copy or modify this software and its documentation
% for educational and research purposes only and without fee is hereby
% granted provided that this copyright notice and the original authors‘
% names appear on all copies and supporting documentation. This program
% shall not be used rewritten or adapted as the basis of a commercial
% software or hardware product without first obtaining permission of the
% authors. The authors make no representations about the suitability of
% this software for any purpose. It is provided “as is“ without express
% or implied warranty.
%----------------------------------------------------------------------
%
% This is an implementation of the algorithm for calculating the
% Structural SIMilarity (SSIM) index between two images
%
% Please refer to the following paper and the website with suggested usage
%
% Z. Wang A. C. Bovik H. R. Sheikh and E. P. Simoncelli “Image
% quality assessment: From error visibility to structural similarity“
% IEEE Transactios on Image Processing vol. 13 no. 4 pp. 600-612
% Apr. 2004.
%
% http://www.ece.uwaterloo.ca/~z70wang/research/ssim/
%
% Note: This program is different from ssim_index.m where no automatic
% downsampling is performed. (downsampling was done in the above paper
% and was described as suggested usage in the above website.)
%
% Kindly report any suggestions or corrections to zhouwang@ieee.org
%
%----------------------------------------------------------------------
%
%Input : (1) img1: the first image being compared
% (2) img2: the second image being compared
% (3) K: constants in the SSIM index formula (see the above
% reference). defualt value: K = [0.01 0.03]
% (4) window: local window for statistics (see the above
% reference). default widnow is Gaussian given by
% window = fspecial(‘gaussian‘ 11 1.5);
% (5) L: dynamic range of the images. default: L = 255
%
%Output: (1) mssim: the mean SSIM index value between 2 images.
% If one of the images being compared is regarded as
% perfect quality then mssim can be considered as the
% quality measure of the other image.
% If img1 = img2 then mssim = 1.
% (2) ssim_map: the SSIM index map of the test image. The map
% has a smaller size than the input images. The actual size
% depends on the window size and the downsampling factor.
%
%Basic Usage:
% Given 2 test images img1 and img2 whose dynamic range is 0-255
%
% [mssim ssim_map] = ssim(img1 img2);
%
%Advanced Usag
相关资源
- 基于Matlab的PSNR算法实现源码,可直接
- 显著性检测SWD--Matlab
- 显著性检测SIM算法--Matlab
- 显著性检测SR算法--Matlab
- 显著性检测CA算法--Matlab
- 基于matlab的神经网络数字识别
- matlab 信道均衡
- 基于Matlab的语音合成技术
- MIMO的ML检测matlab程序
- MIMO的ZF检测matlab程序
- 多径瑞利信道的matlab仿真程序
- MIMO的OSIC检测算法。基于三种方式。
- matlab实现带权重的线性回归
- matlab交互式图像分割源程序
- 基于 HMM算法的语音识别的matlab程序
- 图像SNR、PSNR与MSE计算
- 2004-c题(饮酒驾车的数学模型)+mat
- 非线性扩散--PM算法完整matlab代码
- MATLAB全规则元胞自动机
- Gabor变换 MATLAB程序 根据理论自己编写
- MatLab 批量将24位PNG彩图转换为8位PNG彩
- 用MATLAB实现的MM1仿真
- matlab 绘图教程
- 超全的模式识别Matlab源程序
- SPWM的三相MMC的matlab仿真
- 谐波检测 matlab程序
- 船舶航迹控制
- 船舶海上运动matlab仿真
- 遗传算法改进的模糊C-均值聚类MATLA
- MATLAB 汽车牌照识别程序
评论
共有 条评论