?? ftr_ext.m
字號(hào):
%Simple demonstration of one image face detection operation.
function [modu] = ftr_ext(x)
%global output
[output,count,m,svec]=facefind(x);%full scan
x1 = floor(output(1));
x2 = floor(output(2));
y1 = floor(output(3));
y2 = floor(output(4));
M = x2-x1 +1;
N = y2-y1 +1;
FFTi = zeros(M,N);
FFTq = zeros(M,N);
for m = 1: 1 : M
for n = 1: 1 : N
for l = y1 : 1: y2
for k = x1 : 1: x2
FFTi(m,n) = FFTi(m,n) + x(k,l) * (cos(2*pi*((m*k/M) +(n*l/N))));
FFTq(m,n) = FFTq(m,n) + x(k,l) * (sin(2*pi*((m*k/M) + (n*l/N))));
end
end
end
end
for m = 1: 1 : M
for n = 1: 1 : N
modu(m,n) = sqrt(FFTi(m,n) * FFTi(m,n) + FFTq(m,n) * FFTq(m,n));
disp(modu(m,n));
end
end
imagesc(x), colormap(gray);%show image
plotbox(output,[],2);%plot the detections as red squares
%plotsize(x,m)%plot minmum and maximum face size to detect as green squares in top left corner
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -