💥💥💞💞欢迎来到本博客❤️❤️💥💥
🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。
⛳️座右铭:行百里者,半于九十。
📋📋📋本文目录如下:🎁🎁🎁
目录
💥1 概述
该程序从 .avi 视频中读取图像,找到并跟踪瞳孔在图中的位置。它通过使用计算机视觉技术,如图像处理和模式识别,实现了这一目标。在这个过程中,程序会对图像进行预处理,如去噪和增强,然后应用目标检测算法来识别瞳孔。接着,通过跟踪算法,程序会在连续帧之间追踪瞳孔的运动轨迹,从而实现对瞳孔位置的跟踪和监测。
📚2 运行结果
部分代码:
for cnt = 1:NumberOfFrames
la_imagen=read(obj,cnt);
if size(la_imagen,3)==3
la_imagen=rgb2gray(la_imagen);
end
subplot(212)
piel=~im2bw(la_imagen,0.19);
% --
piel=bwmorph(piel,'close');
piel=bwmorph(piel,'open');
piel=bwareaopen(piel,200);
piel=imfill(piel,'holes');
imagesc(piel);
% Tagged objects in BW image
L=bwlabel(piel);
% Get areas and tracking rectangle
out_a=regionprops(L);
% Count the number of objects
N=size(out_a,1);
if N < 1 || isempty(out_a) % Returns if no object in the image
solo_cara=[ ];
continue
end
% ---
% Select larger area
areas=[out_a.Area];
[area_max pam]=max(areas);
subplot(211)
imagesc(la_imagen);
colormap gray
hold on
rectangle('Position',out_a(pam).BoundingBox,'EdgeColor',[1 0 0],...
'Curvature', [1,1],'LineWidth',2)
centro=round(out_a(pam).Centroid);
X=centro(1);
Y=centro(2);
plot(X,Y,'g+')
%
text(X+10,Y,['(',num2str(X),',',num2str(Y),')'],'Color',[1 1 1])
if X<centro_columna && Y<centro_fila
title('Top left')
elseif X>centro_columna && Y<centro_fila
title('Top right')
elseif X<centro_columna && Y>centro_fila
title('Bottom left')
else
title('Bottom right')
🎉3 参考文献
文章中一些内容引自网络,会注明出处或引用为参考文献,难免有未尽之处,如有不妥,请随时联系删除。
[1]聂丰镐,李梦霞,周孟香等.基于多尺度空洞U-Net的多聚焦图像融合算法[J/OL].激光与光电子学进展:1-18[2024-02-25].http://kns.cnki.net/kcms/detail/31.1690.TN.20240221.1150.002.html.
[2]贺天悦,寇廷栋,张启灿等.计算成像技术在信息复原及增强中的研究进展[J/OL].激光与光电子学进展:1-22[2024-02-25].http://kns.cnki.net/kcms/detail/31.1690.TN.20240220.1333.155.html.
[3]吴霁桐,葛良全,熊茂淋等.铀矿勘查中航空伽马能谱测量的特征参数和图像增强处理[J/OL].成都理工大学学报(自然科学版):1-16[2024-02-25].http://kns.cnki.net/kcms/detail/51.1634.N.20240221.1544.002.html.