Delphi Developer Getting Started
|
Delphi Developer Getting Started |
Assuming that you have already run the Face Detection SDK ActiveX Control installation program and started Delphi, the next step is to install Face Detection SDK ActiveX Control in Delphi. Select Component/Import ActiveX Control/Face Detection SDK ActiveX Control.
Select Control
Click on the Face Detection Control icon and draw it on the form. A rectangle should appear on the form.
Add Button on Form, add this line of code, which will automatically detected the face from our sample image.
procedure TForm1.Button1Click(Sender: TObject);
var iTotalCount: Integer;
begin
FaceDetectionControl1.SetMinNeighbors(4);
FaceDetectionControl1.SetScaleFactor(1.06);
iTotalCount:=FaceDetectionControl1.CountFaces('C:\Program Files (x86)\Face Detection ActiveX Control\FacePhoto\demo1.png');
ShowMessage(Format('Total Detected Face is %d', [iTotalCount] ));
end;
end.