👨🎓个人主页:研学社的博客
💥💥💞💞欢迎来到本博客❤️❤️💥💥
🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。
⛳️座右铭:行百里者,半于九十。
📋📋📋本文目录如下:🎁🎁🎁
目录
💥1 概述
文献来源:
[1] Y. Ohkawa, C. H. Suryanto, K. Fukui, "Fast Combined Separability Filter for Detecting Circular Objects", The twelfth IAPR conference on Machine Vision Applications (MVA) pp.99-103, 2011.
[2] K. Fukui, O. Yamaguchi, "Facial feature point extraction method based on combination of shape extraction and pattern matching", Systems and Computers in Japan 29 (6), pp.49-58, 1998.
本文包含来自[1]和[2]的算法的实现和使用示例,用于检测给定图像中的圆形对象。
[2] 中的算法称为可分离性滤波器,它通过滑动窗口在整个图像中使用圆形的掩模滤波器计算费舍尔准则。通过费舍尔准则的计算,我们得到了一个可分离性图,其中局部峰最有可能是圆形物体的中心。为了加快 [2] 的计算速度,[1] 的工作近似于具有四个组合矩形的圆形形状,并在计算中使用积分图像。详情请参考[1]和[2]。
📚2 运行结果
部分代码:
Im = imread('testimages/cheek.jpg');
gr = double(rgb2gray(Im));
figure(40);clf;
image(Im);
axis equal tight;
title('Original parts of face');
tic
circMap = zeros(size(gr,1),size(gr,2));
for nR = 8:2:12, %multiple scales of separability filter's size (radius)
r=nR; % radius (please refer to [2])
r1=nR; % inner circle radius (please refer to [2])
r2=nR; % outer circle radius (please refer to [2])
cMap = cvtCircleSepFilter(gr, r, r1, r2);
circMap = max(circMap, cMap);
end
timerequired=toc;
fprintf('Time required: %g seconds\n',timerequired);
figure(41);clf;
subplot(1,2,1);
imagesc(cMap);
axis equal tight;
title('Separability map (circular filter)');
subplot(1,2,2);
image(imfuse(gr,cMap));
axis equal tight;
title('Fused image (circular filter)');
% find local peaks
nTH = 0.2; % threshold for local peaks
S1 = imfuse(gr,cMap);
PL = cvtFindLocalPeakX(cMap,1,nTH);
for H=1:size(PL,2)
% draw cross at each local peak (cross size is relative to the peak value)
S1 = cvtDrawCross(S1, PL(2,H),PL(1,H),round(10*PL(3,H)),[255,255,255]);
end
figure(42);clf;
image(S1);
axis equal tight;
title(['Local peaks > ' num2str(nTH) ' (original circular filter)'],'fontweight','bold');
Im = imread('testimages/cheek.jpg');
gr = double(rgb2gray(Im));
figure(40);clf;
image(Im);
axis equal tight;
title('Original parts of face');
tic
circMap = zeros(size(gr,1),size(gr,2));
for nR = 8:2:12, %multiple scales of separability filter's size (radius)
r=nR; % radius (please refer to [2])
r1=nR; % inner circle radius (please refer to [2])
r2=nR; % outer circle radius (please refer to [2])
cMap = cvtCircleSepFilter(gr, r, r1, r2);
circMap = max(circMap, cMap);
end
timerequired=toc;
fprintf('Time required: %g seconds\n',timerequired);
figure(41);clf;
subplot(1,2,1);
imagesc(cMap);
axis equal tight;
title('Separability map (circular filter)');
subplot(1,2,2);
image(imfuse(gr,cMap));
axis equal tight;
title('Fused image (circular filter)');
% find local peaks
nTH = 0.2; % threshold for local peaks
S1 = imfuse(gr,cMap);
PL = cvtFindLocalPeakX(cMap,1,nTH);
for H=1:size(PL,2)
% draw cross at each local peak (cross size is relative to the peak value)
S1 = cvtDrawCross(S1, PL(2,H),PL(1,H),round(10*PL(3,H)),[255,255,255]);
end
figure(42);clf;
image(S1);
axis equal tight;
title(['Local peaks > ' num2str(nTH) ' (original circular filter)'],'fontweight','bold');
Im = imread('testimages/cheek.jpg');
gr = double(rgb2gray(Im));
figure(40);clf;
image(Im);
axis equal tight;
title('Original parts of face');
tic
circMap = zeros(size(gr,1),size(gr,2));
for nR = 8:2:12, %multiple scales of separability filter's size (radius)
r=nR; % radius (please refer to [2])
r1=nR; % inner circle radius (please refer to [2])
r2=nR; % outer circle radius (please refer to [2])
cMap = cvtCircleSepFilter(gr, r, r1, r2);
circMap = max(circMap, cMap);
end
timerequired=toc;
fprintf('Time required: %g seconds\n',timerequired);
figure(41);clf;
subplot(1,2,1);
imagesc(cMap);
axis equal tight;
title('Separability map (circular filter)');
subplot(1,2,2);
image(imfuse(gr,cMap));
axis equal tight;
title('Fused image (circular filter)');
% find local peaks
nTH = 0.2; % threshold for local peaks
S1 = imfuse(gr,cMap);
PL = cvtFindLocalPeakX(cMap,1,nTH);
for H=1:size(PL,2)
% draw cross at each local peak (cross size is relative to the peak value)
S1 = cvtDrawCross(S1, PL(2,H),PL(1,H),round(10*PL(3,H)),[255,255,255]);
end
figure(42);clf;
image(S1);
axis equal tight;
title(['Local peaks > ' num2str(nTH) ' (original circular filter)'],'fontweight','bold');
🎉3 参考文献
部分理论来源于网络,如有侵权请联系删除。
[1] Y. Ohkawa, C. H. Suryanto, K. Fukui, "Fast Combined Separability Filter for Detecting Circular Objects", The twelfth IAPR conference on Machine Vision Applications (MVA) pp.99-103, 2011.
[2] K. Fukui, O. Yamaguchi, "Facial feature point extraction method based on combination of shape extraction and pattern matching", Systems and Computers in Japan 29 (6), pp.49-58, 1998.
🌈4 Matlab代码实现
转载:https://blog.csdn.net/weixin_46039719/article/details/127913518