【图像评价】基于matlab CCF算法的图像质量评价【含Matlab源码 075期】

一、源代码

``
clear all
clc

im = imread(‘1.bmp’);

quality = CCF(im)
function [quality] = CCF(im)

%-------------CCF_colorfulness -----------------
imColor = double(im);

R = imColor(:,:,1);
G = imColor(:,:,2);
B = imColor(:,:,3);

RR = log(R+0.00001) - mean2(log(R+0.00001));
GG = log(G+0.00001) - mean2(log(G+0.00001));
BB = log(B+0.00001) - mean2(log(B+0.00001));

alpha = RR-GG;
beta = 0.5*(RR+GG)-BB;

mu_alpha=mean(mean(alpha));
mu_beta=mean(mean(beta));
var_alpha=var(var(alpha));
var_beta=var(var(beta));

CCF_colorfulness=1000*((sqrt(var_alpha+var_beta)+0.3*sqrt(mu_alpha*mu_alpha+mu_beta*mu_beta))/85.59);    

%-------------CCF_contrast----------------------

im1=rgb2gray(im);
CCF_contrast = CCFcontrast(im1);

%-------------CCF_FADE--------------------------

CCF_FADE = FADE(im);

%------------ normalization ------------------

CCF_colorfulness=mapminmax(CCF_colorfulness,1,10);
CCF_contrast=mapminmax(CCF_contrast,1,10);
CCF_FADE=10-mapminmax(CCF_FADE,1,10);

% ------------calculate image quality with coefficients---------------------

c=[0.17593 0.61759 0.33988 ];
quality = c(1)*(CCF_colorfulness) + c(2)*(CCF_contrast) + c(3)*(CCF_FADE)   

end


## 二、备注

完整代码或者代写添加QQ2449341593
往期回顾>>>>>>
[【图像识别】基于matlab路面裂缝识别含GUI【含Matlab源码 009期】](https://blog.csdn.net/TIQCmatlab/article/details/112000326)
[【图像识别】基于matlab身份证号码识别【含Matlab源码 014期】](https://blog.csdn.net/TIQCmatlab/article/details/112059070)
[【图像压缩】基于matlab图像处理教程系列之图像压缩【含Matlab源码 024期】](https://blog.csdn.net/TIQCmatlab/article/details/112093334)
[【图像分割】基于matlab图像处理教程系列之图像分割(一)【含Matlab源码 025期】](https://blog.csdn.net/TIQCmatlab/article/details/112093363)
[【图像分割】基于matlab图像处理教程系列之图像分割(二)【含Matlab源码 026期】](https://blog.csdn.net/TIQCmatlab/article/details/112093369)
[【模式识别】基于matlab指纹识别【含Matlab源码 029期】](https://blog.csdn.net/TIQCmatlab/article/details/112093449)
[【模式识别】基于matlab银行卡号识别【含Matlab源码 030期】](https://blog.csdn.net/TIQCmatlab/article/details/112093474)
[【图像聚类】基于matlab FCM和改进的FCM脑部CT图像聚类【含Matlab源码 074期】](https://blog.csdn.net/TIQCmatlab/article/details/113089831)

你可能感兴趣的:(matlab,图像处理)