您现在的位置: 主页 > 电源 > 电源管理 > ECG信号数字化处理技术 - 模拟电源 -
本文所属标签:
为本文创立个标签吧:

ECG信号数字化处理技术 - 模拟电源 -

来源: 网络用户发布,如有版权联系网管删除 2018-09-23 

ECG信号是一维的数据。一般被记录在热敏纸上。不便于保存和处理。可以先用扫描仪,至少300DPI的分辨率,扫描下来。

使用PHOTOSHOP的旋转将图旋转到正确方向。使用魔棒工具 容差50 连续 将相应图线选出。反选后将背景的格子颜色,及说明去除。图像模式改为灰度,去除颜色。再交图像模式改为位图。50%阈值。另存成bmp文件。

然后使用下面的程序转换。bmp文件被读入MATLAB中,并查找非空边沿,然后再做一维数字化。bmp图像转换成对应文件名的文本文件,文本文件可以导入EXCEL或其它可以接受数据的程序中。数据以科学计数法表示。

% remove blank line and digitalize
% try to find 4 boundery and put it to
% an txt file
% 4 bounder is bup bdown bleft bright
%
% usage: removeblank 'filename' filename must be a bmp file

function y = removeblank( x )
a = imread(x,'bmp');
for i = 1 : length(a(:,1))
    if(length(find(a(i,:))) ~= 0)
        bup = i;
        break;
    end
end
for i = length(a(:,1)) : -1 : 1
    if(length(find(a(i,:))) ~= 0)
        bdown = i;
        break;
    end
end 
for i = length(a(1,:)) : -1 : 1
    if(length(find(a(:,i))) ~= 0)
        bright = i;
        break;
    end
end 
  
for i = 1 : length(a(1,:))
    if(length(find(a(:,i))) ~= 0)
        bleft = i;
        break;
    end
end;
% 4 boundery found


fid = fopen(['dg',x,'.txt'],'W');

for i = bup : bdown
    b = find(a(i, bleft : bright));
   
    if(length(b) == 0)
        c(i - bup + 1) = c(i - bup)
    else
    c(i-bup + 1) = sum(b)/(length(b));
end
fprintf(fid,'%6d\n',c(i-bup + 1));

end;
plot(c);
fclose(fid);
%imwrite(a(bup : bdown, bleft : bright),['rb',x] ,'bmp');



              查看评论 回复



嵌入式交流网主页 > 电源 > 电源管理 > ECG信号数字化处理技术 - 模拟电源 -
 

"ECG信号数字化处理技术 - 模拟电源 -"的相关文章

网站地图

围观()