【成像光敏描记图提取和处理】成像-光电容积描记-提取-脉搏率-估计(Matlab代码实现)

 💥💥💞💞欢迎来到本博客❤️❤️💥💥

🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。

⛳️座右铭:行百里者,半于九十。

📋📋📋本文目录如下:🎁🎁🎁

目录

💥1 概述

📚2 运行结果

🎉3 参考文献

🌈4 Matlab代码实现


💥1 概述

【成像光敏描记图提取和处理】成像-光电容积描记-提取-脉搏率-估计

成像光电容积描记图(iPPG)是一种用于远程非接触式脉搏率测量的技术。iPPG通常从面部或手掌视频中获取。
该软件包提供了用于iPPG信号提取和处理的工具。来自[1]的恒河猴iPPG数据被用作测试数据集。
输入:视频文件。
输出:iPPG信号;估计脉搏率。
内容:
1.extract_color_channels_from_video从视频中提取颜色信号。颜色信号计算为每个视频帧的红色、绿色和蓝色分量值,这些分量在感兴趣区域 (ROI) 上取平均值。ROI可以手动选择第一帧(如果预计只有有限的运动量)或使用Viola-Jones算法自动设置(仅用于从人脸中提取iPPG!此功能可以选择从 ROI 中排除非皮肤和损坏的像素。
2. compute_ippg实施了[2]中考虑的iPPG提取方法(包括最近引入的CHROM和POS方法)以及一些iPPG预处理和后处理技术。
3. ippg_extraction_example - 使用软件包从视频中提取的iPPG估计脉搏率的基本(最小)示例。
4. dataset_analysis - 将包用于 [1] 中的数据的扩展示例。
5. 作为单独的 m 文件实现的信号处理技术:wavelet_filter、wavelet_init_scales、smoothness_priors_detrending、std_sliding_win。
6. 根据iPPG信号估计脉率的功能:
6.1.DFT_pulse_rate_estimate使用离散傅里叶变换来计算平均脉搏率。
6.2. wavelet_pulse_rate_estimate使用连续小波变换来估计脉搏率。
7. 用于比较基于 iPPG 的脉搏率与基本事实的有用函数:
7.1.bland_altman_plot - 绘制数据的平淡阿尔曼图。
7.2. compute_SNR - 计算给定真实脉冲速率的 iPPG 信号的信噪比 (SNR)。
7.3. assess_estimation_performance - 计算许多估计质量指标,包括均方根误差、平均绝对误差、皮尔逊相关等
8.数据集文件夹包含用于测试包的数据集。数据集是从恒河猴记录的,因此脉搏率高于人类(100-250 BPM),详情请参考[1]。
9. dataset_description.docx包含数据集的简要说明。

📚2 运行结果

部分代码:

%number of frames nearest to the fftWindow/2 and corresponding to integer number of seconds in video
DFT_WINDOW_SHIFT = [ 510, 510, 500, 1000, 500, 500, 500, 500, 510, 1000, 500];                     

finalPPG = cell(nFile, 1);

shareErrorBelow3p5BPM = cell(nFile, 1);
shareErrorBelow7BPM = cell(nFile, 1);
corrCoef = cell(nFile, 1);
meanError = cell(nFile, 1);
rmse = cell(nFile, 1);
stdError = cell(nFile, 1);
snr = cell(nFile, 1);
corrPvalue = cell(nFile, 1);

%variables for motion estimation
nBins = {6,8,6,4,6,4,8,6,1,1,1};  % optimal number of bins for computing SNR (selected based on estimation errors)
motionData = cell(nFile, 1);
errorForMotion = cell(nFile, 1);
startPosForMotion = cell(nFile, 1);
endPosForMotion = cell(nFile, 1);
dFreqMotion = cell(nFile, 1);

nSubject = length(unique(SUBJECT_INDEX));
subjectHRtrue = cell(nSubject, 1);
subjectHRestimate = cell(nSubject, 1);
subjectSessionIndex = cell(nSubject, 1);
  
hrTrue = cell(1, nFile);
hrEstimated = cell(1, nFile);
xt = cell(1, nFile);

% estimate pulse rates for the dataset and evaluation of estimates' performance 
for iFile = 1:nFile
  % set iPPG parameters for each file

%number of frames nearest to the fftWindow/2 and corresponding to integer number of seconds in video
DFT_WINDOW_SHIFT = [ 510, 510, 500, 1000, 500, 500, 500, 500, 510, 1000, 500];                     

finalPPG = cell(nFile, 1);

shareErrorBelow3p5BPM = cell(nFile, 1);
shareErrorBelow7BPM = cell(nFile, 1);
corrCoef = cell(nFile, 1);
meanError = cell(nFile, 1);
rmse = cell(nFile, 1);
stdError = cell(nFile, 1);
snr = cell(nFile, 1);
corrPvalue = cell(nFile, 1);

%variables for motion estimation
nBins = {6,8,6,4,6,4,8,6,1,1,1};  % optimal number of bins for computing SNR (selected based on estimation errors)
motionData = cell(nFile, 1);
errorForMotion = cell(nFile, 1);
startPosForMotion = cell(nFile, 1);
endPosForMotion = cell(nFile, 1);
dFreqMotion = cell(nFile, 1);

nSubject = length(unique(SUBJECT_INDEX));
subjectHRtrue = cell(nSubject, 1);
subjectHRestimate = cell(nSubject, 1);
subjectSessionIndex = cell(nSubject, 1);
  
hrTrue = cell(1, nFile);
hrEstimated = cell(1, nFile);
xt = cell(1, nFile);

% estimate pulse rates for the dataset and evaluation of estimates' performance 
for iFile = 1:nFile
  % set iPPG parameters for each file

🎉3 参考文献

文章中一些内容引自网络,会注明出处或引用为参考文献,难免有未尽之处,如有不妥,请随时联系删除。

 [1] Unakafov AM, Moeller S, Kagan I, Gail A, Treue S, Wolf F. 使用成像光电容积脉搏波法估计非人灵长类动物的心率。公共科学图书馆一号2018;13(8):e0202581。Using imaging photoplethysmography for heart rate estimation in non-human primates | PLOS ONE
[2] 乌纳卡福夫 AM.使用成像光电容积描记法估计脉搏波:通用框架和公开数据集上的方法比较。生物医学物理与工程快报。2018;4(4):045001.

🌈4 Matlab代码实现

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值