【图像检测】基于Combined Separability Filter实现鼻孔和瞳孔等圆检测matlab源码
【图像检测】基于Combined Separability Filter实现鼻孔和瞳孔等圆检测matlab源码
TT_Matlab
博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,完整matlab代码或者程序定制加qq1575304183。
1 内容介绍
In this paper, we propose a fast combined separabil-ity filter, which can selectively detect circular features such as pupils and nostrils in an image of the human face. The proposed filter is designed as a combination of multiple rectangle separability filters so that it can achieve high-speed processing and high positioning ac-curacy at the same time. The evaluation experiments using synthetic images and real face images show that the proposed filter is 70 times faster than the conven-tional circular separability filter.
2 仿真代码
function MAP = cvtCombSimpRectFilter(I,P,sh)
% Function to generate separability map for rectangular filters (vertical and horizontal)
% Input: I: integral image, obtained by using cvtIntegralImage45(X);
% P: integral image of the square pixel values, obtained by using cvtIntegralImage45(X.^2);
% sh: size of the filter
% Output: MAP: two separability maps (diagonal left and diagonal right), with size: [Height, Width, 2].
%
bh = sh*2;
bw = ceil(sh/3);
sw = ceil(sh/3);
dh =0;
dw =0;
MAP(:,:,1) = tmpFnc(I,P,bh,bw,sh,sw,dh,dw);
MAP(:,:,2) = tmpFnc(I,P,bw,bh,sw,sh,dh,dw);
end
%%
function MAP = tmpFnc(I,P,bh,bw,sh,sw,dh,dw)
MAP = zeros(size(I)-1);
[H,W] = size(MAP);
r = max([bh,bw]);
N = (2*bh+1)*(2*bw+1);
N1 = (2*sh+1)*(2*sw+1);
N2 = N-N1;
S =I((1+r:H-r)-bh,(1+r:W-r)-bw) + I((1+r:H-r)+bh+1,(1+r:W-r)+bw+1) - I((1+r:H-r)-bh,(1+r:W-r)+bw+1) -I((1+r:H-r)+bh+1,(1+r:W-r)-bw);
T =P((1+r:H-r)-bh,(1+r:W-r)-bw) + P((1+r:H-r)+bh+1,(1+r:W-r)+bw+1) - P((1+r:H-r)-bh,(1+r:W-r)+bw+1) -P((1+r:H-r)+bh+1,(1+r:W-r)-bw);
M = S./N;
Y = T./N;
St = Y - M.^2;
S1 =I((1+r:H-r)-sh+dh,(1+r:W-r)-sw+dw) + I((1+r:H-r)+sh+dh+1,(1+r:W-r)+sw+dw+1) - I((1+r:H-r)-sh+dh,(1+r:W-r)+sw+dw+1) - I((1+r:H-r)+sh+dh+1,(1+r:W-r)-sw+dw);
S2=S-S1;
M1=S1./N1;
M2=S2./N2;
Sb = ((N1*((M1-M).^2)) + (N2*((M2-M).^2)))/N;
MAP((1+r:H-r),(1+r:W-r)) = (Sb./St).*sign(M2-M1);
MAP(isnan(MAP))=0;
MAP(isinf(MAP))=0;
end
3 运行结果
4 参考文献
[1] Qiu C , Kotani K , Lee F , et al. An Accurate Eye Detection Method Using Elliptical Separability Filter and Combined Features[J]. Int.j.comput. netw.secur, 2009, 9(8):65-72.
[2] 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.
[3] 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.
博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。
部分理论引用网络文献,若有侵权联系博主删除。
-
2023年血糖新标准公布,不是3.9-6.1,快来看看你的血糖正常吗? 2023-02-07
-
2023年各省最新电价一览!8省中午执行谷段电价! 2023-01-03
-
GB 55009-2021《燃气工程项目规范》(含条文说明),2022年1月1日起实施 2021-11-07
-
PPT导出高分辨率图片的四种方法 2022-09-22
-
2023年最新!国家电网27家省级电力公司负责人大盘点 2023-03-14
-
全国消防救援总队主官及简历(2023.2) 2023-02-10
-
盘点 l 中国石油大庆油田现任领导班子 2023-02-28
-
我们的前辈!历届全国工程勘察设计大师完整名单! 2022-11-18
-
关于某送变电公司“4·22”人身死亡事故的快报 2022-04-26
