✅博主简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,Matlab项目合作可私信。
🍎个人主页:海神之光
🏆代码获取方式:
海神之光Matlab王者学习之路—代码获取方式
⛳️座右铭:行百里者,半于九十。
更多Matlab仿真内容点击👇
Matlab图像处理(进阶版)
路径规划(Matlab)
神经网络预测与分类(Matlab)
优化求解(Matlab)
语音处理(Matlab)
信号处理(Matlab)
车间调度(Matlab)
⛄一、无参考图像质量评价NIQE简介
理论知识参考:通用型无参考图像质量评价算法综述
⛄二、部分源代码
function [mu_prisparam cov_prisparam] = estimatemodelparam(folderpath,…
blocksizerow,blocksizecol,blockrowoverlap,blockcoloverlap,sh_th)
% Input
% folderpath - Folder containing the pristine images
% blocksizerow - Height of the blocks in to which image is divided
% blocksizecol - Width of the blocks in to which image is divided
% blockrowoverlap - Amount of vertical overlap between blocks
% blockcoloverlap - Amount of horizontal overlap between blocks
% sh_th - The sharpness threshold level
%Output
%mu_prisparam - mean of multivariate Gaussian model
%cov_prisparam - covariance of multivariate Gaussian model
% Example call
%[mu_prisparam cov_prisparam] = estimatemodelparam(‘pristine’,96,96,0,0,0.75);
%----------------------------------------------------------------
% Find the names of images in the folder
current = pwd;
cd(sprintf(‘%s’,folderpath))
names = ls;
names = names(3:end,:);%
cd(current)
% ---------------------------------------------------------------
%Number of features
% 18 features at each scale
featnum = 18;
% ---------------------------------------------------------------
% Make the directory for storing the features
mkdir(sprintf(‘local_risquee_prisfeatures’))
% ---------------------------------------------------------------
% Compute pristine image features
for itr = 1:size(names,1)
itr
im = imread(sprintf(‘%s\%s’,folderpath,names(itr,:)));
if(size(im,3)==3)
im = rgb2gray(im);
end
im = double(im);
[row col] = size(im);
block_rownum = floor(row/blocksizerow);
block_colnum = floor(col/blocksizecol);
im = im(1:block_rownumblocksizerow, …
1:block_colnumblocksizecol);
window = fspecial(‘gaussian’,7,7/6);
window = window/sum(sum(window));
scalenum = 2;
warning(‘off’)
feat = [];
for itr_scale = 1:scalenum
mu = imfilter(im,window,‘replicate’);
mu_sq = mu.*mu;
sigma = sqrt(abs(imfilter(im.*im,window,‘replicate’) - mu_sq));
structdis = (im-mu)./(sigma+1);
feat_scale = blkproc(structdis,[blocksizerow/itr_scale blocksizecol/itr_scale], …
[blockrowoverlap/itr_scale blockcoloverlap/itr_scale], …
@computefeature);
feat_scale = reshape(feat_scale,[featnum …
size(feat_scale,1)*size(feat_scale,2)/featnum]);
feat_scale = feat_scale’;
if(itr_scale == 1)
sharpness = blkproc(sigma,[blocksizerow blocksizecol], …
[blockrowoverlap blockcoloverlap],@computemean);
sharpness = sharpness(😃;
end
feat = [feat feat_scale];
im =imresize(im,0.5);
end
function quality = computequality(im,blocksizerow,blocksizecol,…
blockrowoverlap,blockcoloverlap,mu_prisparam,cov_prisparam)
% Input1
% im - Image whose quality needs to be computed
% blocksizerow - Height of the blocks in to which image is divided
% blocksizecol - Width of the blocks in to which image is divided
% blockrowoverlap - Amount of vertical overlap between blocks
% blockcoloverlap - Amount of horizontal overlap between blocks
% mu_prisparam - mean of multivariate Gaussian model
% cov_prisparam - covariance of multivariate Gaussian model
% For good performance, it is advisable to use make the multivariate Gaussian model
% using same size patches as the distorted image is divided in to
% Output
%quality - Quality of the input distorted image
% Example call
%quality = computequality(im,96,96,0,0,mu_prisparam,cov_prisparam)
% ---------------------------------------------------------------
%Number of features
% 18 features at each scale
featnum = 18;
%----------------------------------------------------------------
%Compute features
if(size(im,3)==3)
im = rgb2gray(im);
end
im = double(im);
[row col] = size(im);
block_rownum = floor(row/blocksizerow);
block_colnum = floor(col/blocksizecol);
im = im(1:block_rownumblocksizerow,1:block_colnumblocksizecol);
[row col] = size(im);
block_rownum = floor(row/blocksizerow);
block_colnum = floor(col/blocksizecol);
im = im(1:block_rownumblocksizerow, …
1:block_colnumblocksizecol);
window = fspecial(‘gaussian’,7,7/6);
window = window/sum(sum(window));
scalenum = 2;
warning(‘off’)
feat = [];
⛄三、运行结果
⛄四、matlab版本及参考文献
1 matlab版本
2014a
2 参考文献
[1]杨璐,王辉,魏敏.基于机器学习的无参考图像质量评价综述[J].计算机工程与应用. 2018,54(19)
3 备注
简介此部分摘自互联网,仅供参考,若侵权,联系删除
🍅 仿真咨询
1 各类智能优化算法改进及应用
生产调度、经济调度、装配线调度、充电优化、车间调度、发车优化、水库调度、三维装箱、物流选址、货位优化、公交排班优化、充电桩布局优化、车间布局优化、集装箱船配载优化、水泵组合优化、解医疗资源分配优化、设施布局优化、可视域基站和无人机选址优化
2 机器学习和深度学习方面
卷积神经网络(CNN)、LSTM、支持向量机(SVM)、最小二乘支持向量机(LSSVM)、极限学习机(ELM)、核极限学习机(KELM)、BP、RBF、宽度学习、DBN、RF、RBF、DELM、XGBOOST、TCN实现风电预测、光伏预测、电池寿命预测、辐射源识别、交通流预测、负荷预测、股价预测、PM2.5浓度预测、电池健康状态预测、水体光学参数反演、NLOS信号识别、地铁停车精准预测、变压器故障诊断
3 图像处理方面
图像识别、图像分割、图像检测、图像隐藏、图像配准、图像拼接、图像融合、图像增强、图像压缩感知
4 路径规划方面
旅行商问题(TSP)、车辆路径问题(VRP、MVRP、CVRP、VRPTW等)、无人机三维路径规划、无人机协同、无人机编队、机器人路径规划、栅格地图路径规划、多式联运运输问题、车辆协同无人机路径规划、天线线性阵列分布优化、车间布局优化
5 无人机应用方面
无人机路径规划、无人机控制、无人机编队、无人机协同、无人机任务分配
6 无线传感器定位及布局方面
传感器部署优化、通信协议优化、路由优化、目标定位优化、Dv-Hop定位优化、Leach协议优化、WSN覆盖优化、组播优化、RSSI定位优化
7 信号处理方面
信号识别、信号加密、信号去噪、信号增强、雷达信号处理、信号水印嵌入提取、肌电信号、脑电信号、信号配时优化
8 电力系统方面
微电网优化、无功优化、配电网重构、储能配置
9 元胞自动机方面
交通流 人群疏散 病毒扩散 晶体生长
10 雷达方面
卡尔曼滤波跟踪、航迹关联、航迹融合