5
RGB=load(folder+exp+"_RGB.txt");
6
RGB_nc=load(folder+exp+"_nc_RGB.txt");
11
dt=1/30; % èíòåðâàë âðåìåííîé äèñêðåòèçàöèè
12
nc=0:dt:length(RGB)*dt-dt;
13
fmin=0.15; % íèæíÿÿ ãðàíèöà - ÷àñòîòíûé äèàïàçîí äûõàòåëüíîé âîëíû
14
dt=1/30; % èíòåðâàë âðåìåííîé äèñêðåòèçàöèè
15
Nmed=1/(dt*fmin); % àïåðòóðà ôèëüòðà
17
figure('Name','RGB','Position', [0 0 600 300]); set(gcf,'name',"Ñðàâíåíèå ìåäèàííîé ôèëüòðàöèè"); clf;
19
plot(nc, RGB(:,1),"red", nc, RGB(:,2),"green", nc, RGB(:,3),"blue");
20
title("Âðåìåííîé ðÿä RGB äî êîìïåíñàöèè öâåòà"); grid on;
21
ylim([40;105]); xlabel("Ñåêóíäû"); ylabel("Èíòåíñèâíîñòü öâåòîâûõ êàíàëîâ");
24
plot(nc, RGB_nc(:,1),"red", nc, RGB_nc(:,2),"green", nc, RGB_nc(:,3),"blue");
25
title("Âðåìåííîé ðÿä RGB ïîñëå êîìïåíñàöèè öâåòà"); grid on;
26
ylim([40;105]); xlabel("Ñåêóíäû"); ylabel("Èíòåíñèâíîñòü öâåòîâûõ êàíàëîâ");
31
RGB_med(:,1)=RGB_med(:,1)-medfilt1(RGB_med(:,1),Nmed);
32
RGB_med(:,2)=RGB_med(:,2)-medfilt1(RGB_med(:,2),Nmed);
33
RGB_med(:,3)=RGB_med(:,3)-medfilt1(RGB_med(:,3),Nmed);
34
plot(nc, RGB_med(:,1),"red", nc, RGB_med(:,2),"green", nc, RGB_med(:,3),"blue");
35
title("Âðåìåííîé ðÿä RGB ïîñëå êîìïåíñàöèè öâåòà è ìåäèàííîãî ôèëüòðà ñ îêíîì N_m_e_d="+Nmed); grid on;
36
ylim([-4;4]); xlabel("Ñåêóíäû"); ylabel("Èíòåíñèâíîñòü öâåòîâûõ êàíàëîâ");