【图像评价】CCF算法之图像质量评价【Matlab 117期】

一、源代码

``
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


## 二、备注

完整代码或者代写添加QQ912100926
往期回顾>>>>>>
[【图像压缩】图像处理教程系列之图像压缩【Matlab 074期】](https://blog.csdn.net/m0_54742769/article/details/113329310)
[【图像分割】图像处理教程系列之图像分割(一)【Matlab 075期】](https://blog.csdn.net/m0_54742769/article/details/113329381)
[【图像分割】图像处理教程系列之图像分割(二)【Matlab 076期】](https://blog.csdn.net/m0_54742769/article/details/113329531)
[【模式识别】银行卡号之识别【Matlab 077期】](https://blog.csdn.net/m0_54742769/article/details/113330027)
[【模式识别】指纹识别【Matlab 078期】](https://blog.csdn.net/m0_54742769/article/details/113330226)
[【图像处理】基于GUI界面之DWT+DCT+PBFO改进图像水印隐藏提取【Matlab 079期】](https://blog.csdn.net/m0_54742769/article/details/113330428)
[【图像融合】CBF算法之图像融合【Matlab 080期】](https://blog.csdn.net/m0_54742769/article/details/113330702)
[【图像去噪】自适应形态学之图像去噪【Matlab 081期】](https://blog.csdn.net/m0_54742769/article/details/113404871)
[【图像增强】DEHAZENET和HWD之水下去散射图像增强【Matlab 082期】](https://blog.csdn.net/m0_54742769/article/details/113404894)
[【图像增强】PSO寻优ACE之图像增强【Matlab 083期】](https://blog.csdn.net/m0_54742769/article/details/113404927)
[【图像重建】ASTRA算法之图像重建【Matlab 084期】](https://blog.csdn.net/m0_54742769/article/details/113404955)
[【图像分割】四叉树之图像分割【Matlab 085期】](https://blog.csdn.net/m0_54742769/article/details/113404988)
[【图像分割】心脏中心线之提取【Matlab 086期】](https://blog.csdn.net/m0_54742769/article/details/113405016)
[【图像识别】SVM植物叶子之疾病检测和分类【Matlab 087期】](https://blog.csdn.net/m0_54742769/article/details/113405033)
[【图像识别】基于GUI界面之模板匹配手写数字识别系统【Matlab 088期】](https://blog.csdn.net/m0_54742769/article/details/113405057)
[【图像识别】基于GUI界面之不变矩的数字验证码识别【Matlab 089期】](https://blog.csdn.net/m0_54742769/article/details/113405094)
[【图像识别】条形码识别系统【Matlab 090期】](https://blog.csdn.net/m0_54742769/article/details/113405121)
[【图像识别】基于GUI界面RGB和BP神经网络之人民币识别系统【Matlab 091期】](https://blog.csdn.net/m0_54742769/article/details/113426720)
[【图像识别】CNN卷积神经网络之验证码识别【Matlab 092期】](https://blog.csdn.net/m0_54742769/article/details/113426741)
[【图像分类】极限学习分类器之对遥感图像分类【Matlab 093期】](https://blog.csdn.net/m0_54742769/article/details/113426857)
[【图像变换】DIBR-3D之图像变换【Matalb 094期】](https://blog.csdn.net/m0_54742769/article/details/113427092)
[【图像分割】模糊聚类算法之FCM图像分割【Matlab 095期】](https://blog.csdn.net/m0_54742769/article/details/113427214)
[【模式识别】银行监控系统之人脸识别【Matlab 096期】](https://blog.csdn.net/m0_54742769/article/details/113427428)
[【模式识别】基于GUI界面之疲劳检测系统【Matlab 097期】](https://blog.csdn.net/m0_54742769/article/details/113427690)
[【图像识别】国外车牌识别【Matlab 098期】](https://blog.csdn.net/m0_54742769/article/details/113427779)
[【图像分割】最大类间方差法(otsu)之图像分割【Matlab 099期】](https://blog.csdn.net/m0_54742769/article/details/113428052)
[【图像分割】直觉模糊C均值聚类之图像分割IFCM【Matlab 100期】](https://blog.csdn.net/m0_54742769/article/details/113428151)
[【图像分割】基于matlab形态学重建和过滤改进FCM算法(FRFCM)之图像分割【Matlab 101期】](https://blog.csdn.net/m0_54742769/article/details/113454422)
[【图像增强】局部对比度增强CLAHE算法之直方图增强【Matlab 102期】](https://blog.csdn.net/m0_54742769/article/details/113454471)
[【图像融合】Frequency Partition之图像融合【Matlab 103期】](https://blog.csdn.net/m0_54742769/article/details/113454636)
[【图像评价】SVM之图像无参考质量评价【Matlab 104期】](https://blog.csdn.net/m0_54742769/article/details/113454636)
[【图像边缘检测】最小二乘法用于椭圆边缘检测【Matlab 105期】](https://blog.csdn.net/m0_54742769/article/details/113454686)
[【图像加密】基于GUI界面之混沌系统图像加密解密【Matlab 106期】](https://blog.csdn.net/m0_54742769/article/details/113454885)
[【图像配准】SIFT算法之图像配准【Matlab 107期】](https://blog.csdn.net/m0_54742769/article/details/113455044)
[【图像分割】随机游走算法用于图像分割【Matlab 108期】](https://blog.csdn.net/m0_54742769/article/details/113455097)
[【图像分割】形态学重建和过滤改进FCM算法(FRFCM)用于图像分割【Matlab 109期】](https://blog.csdn.net/m0_54742769/article/details/113455167)
[【图像分割】图像分割IFCM之直觉模糊C均值聚类【Matlab 110期】](https://blog.csdn.net/m0_54742769/article/details/113506014)
[【图像增强】区域相似变换函数与蜻蜓算法之灰度图像增强【Matlab 111期】](https://blog.csdn.net/m0_54742769/article/details/113506120)
[【图像直线拟合】最小二乘法之图像直线拟合【Matlab 112期】](https://blog.csdn.net/m0_54742769/article/details/113506194)
[【图像去雾】暗通道之图像去雾【Matlab 113期】](https://blog.csdn.net/m0_54742769/article/details/113506301)
[【图像识别】基于matlab GUI界面之路面裂缝识别【Matlab 114期】](https://blog.csdn.net/m0_54742769/article/details/113506394)
[【图像识别】身份证号码之识别【Matlab 115期】](https://blog.csdn.net/m0_54742769/article/details/113506507)
[【图像聚类】FCM和改进之FCM脑部CT图像聚类【Matlab 116期】](https://blog.csdn.net/m0_54742769/article/details/113506684)

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