• 大小: 0.01M
    文件类型: .zip
    金币: 2
    下载: 0 次
    发布日期: 2024-01-28
  • 语言: 其他
  • 标签: 其他  

资源简介

视频提取脉搏波程序.zip

资源截图

代码片段和文件信息

% function videofs = duquvideo(FPS)

% [filenamepathname~]=uigetfile({‘*.mov;*.avi;*.mp4;*.wmv;*.mpg;*.asf;*.m4v‘}‘请选择一个待处理视频文件‘);
% videoobj=VideoReader([pathname filename]);
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % if nargin == 0
% %     FPS = videoobj.frameRate; %无修正帧率时,使用默认帧率
% % end
% FPS=videoobj.frameRate;
% % if FPS == 50
% %     FPS = 51.9; %修正帧率
% % end
% NFS=videoobj.Numberofframes;%帧数

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%框选面部区域%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ImgData = read(videoobj5);     %用read读入视频文件这里读取的是第5帧
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%框选区域%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% hf_func=figure(‘Name‘‘请框选需要计算的区域‘‘Numbertitle‘‘off‘‘menubar‘‘none‘...
%     ‘Units‘‘Normalized‘‘Position‘[0.25 0.25 0.5 0.5]);
% % imshow(ImgData);%分离三个通道
% [XYIm_croprect]=imcrop(ImgData);         %roipoly   %ginput
% line([rect(1)rect(1)][rect(2)rect(2)+rect(4)]);
% line([rect(1)+rect(3)rect(1)+rect(3)][rect(2)rect(2)+rect(4)]);%rect向量分别为xydeltaxdeltay
% line([rect(1)rect(1)+rect(3)][rect(2)rect(2)]);
% line([rect(1)rect(1)+rect(3)][rect(2)+rect(4)rect(2)+rect(4)]);
% pause(1)
% close(hf_func);
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ImgDatai=ImgData(floor(rect(2)):floor(rect(2)+rect(4))floor(rect(1)):floor(rect(1)+rect(3)):);%框选出来的区域
% figure;imshow(ImgDatai);%显示视频截图

% hf_func=figure(‘Name‘‘请框选需要计算的区域‘‘Numbertitle‘‘off‘‘menubar‘‘none‘...
%     ‘Units‘‘Normalized‘‘Position‘[0.25 0.25 0.5 0.5]);
% [XYIm_croprectl]=imcrop(ImgData);         %roipoly   %ginput
% line([rectl(1)rectl(1)][rectl(2)rectl(2)+rectl(4)]);
% line([rectl(1)+rectl(3)rectl(1)+rectl(3)][rectl(2)rectl(2)+rectl(4)]);%rect向量分别为xydeltaxdeltay
% line([rectl(1)rectl(1)+rectl(3)][rectl(2)rectl(2)]);
% line([rectl(1)rectl(1)+rectl(3)][rectl(2)+rectl(4)rectl(2)+rectl(4)]);
% pause(1)
% close(hf_func);

% hf_func=figure(‘Name‘‘请框选需要计算的区域‘‘Numbertitle‘‘off‘‘menubar‘‘none‘...
%     ‘Units‘‘Normalized‘‘Position‘[0.25 0.25 0.5 0.5]);
% [XYIm_croprectr]=imcrop(ImgData);         %roipoly   %ginput
% line([rectr(1)rectr(1)][rectr(2)rectr(2)+rectr(4)]);
% line([rectr(1)+rectr(3)rectr(1)+rectr(3)][rectr(2)rectr(2)+rectr(4)]);%rect向量分别为xydeltaxdeltay
% line([rectr(1)rectr(1)+rectr(3)][rectr(2)rectr(2)]);
% line([rectr(1)rectr(1)+rectr(3)][rectr(2)+rectr(4)rectr(2)+rectr(4)]);
% pause(1)
% close(hf_func);

% % R=ImgData;R(::2)=0;R(::3)=0;figure;imshow(R);     %分离显示三个通道
% % G=ImgData;G(::1)=0;G(::3)=0;figure;imshow(G);
% % B=ImgData;B(::1)=0;B(::2)=0;figure;imshow(B);
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% RT=zeros(1NFS);GT=RT;BT=RT; %这三个数组用于记录RGB三个通道上平均灰度随时间变化的值
% for framesnum=1:NFS   %依次读取每帧
%     frame = read(videoobjframesnum);     %用read读入视频文件
%     ImgDatai=fram

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件        6690  2018-09-05 09:05  duquvideo.m
     文件        8827  2018-09-05 09:05  maincode.m
     文件        8149  2018-09-05 09:05  shipinica.m

评论

共有 条评论