我有一個關於人臉檢測的最終項目。我決定使用Matlab和計算機視覺工具箱來完成這個項目,因爲如你所知,這個工具箱使用Viola Jones算法進行物體檢測。在Matlab中使用計算機視覺工具箱(Viola Jones)進行人臉檢測
我寫了下面的代碼,但是代碼將一張臉與一個非臉對象進行匹配。
問題
我該如何更改代碼以便它只匹配面孔?
clear all
clc
% Read input image
I = imread('C:\imageprocessingwithMatlab\Image001.jpg');
figure,imshow(I);
%% Detect Faces in the image
% Create a detector object
faceDetector = vision.CascadeObjectDetector('FrontalFaceCART');
% Detect faces
bbox = step(faceDetector, I);
% Draw boxes around detected faces and display results
IFaces = insertObjectAnnotation(I, 'rectangle', bbox, 'Face');
figure, imshow(IFaces), title('Detected Faces');
問題是什麼?你能澄清一下嗎? – kkuilla
程序檢測與另一個不同的對象正確的面部,我只想程序只檢測正確的面部。 – yigitcannalci
非常感謝kkuilla。 – yigitcannalci