mirror of
https://github.com/Laex/Delphi-OpenCV.git
synced 2024-11-15 15:55:53 +01:00
Add sample:
[*] samples/MultiDemo/FaceDetectAndLockWorkstation/LockWorkstation.dpr Signed-off-by: Michael Grigorev <sleuthhound@gmail.com>
This commit is contained in:
parent
174f95f663
commit
33337ea3db
@ -0,0 +1,25 @@
|
||||
program LockWorkstation;
|
||||
|
||||
uses
|
||||
Vcl.Forms,
|
||||
uMainForm in 'uMainForm.pas' {MainForm},
|
||||
uLibName in '..\..\..\include\uLibName.pas',
|
||||
highgui_c in '..\..\..\include\highgui\highgui_c.pas',
|
||||
core_c in '..\..\..\include\core\core_c.pas',
|
||||
Core.types_c in '..\..\..\include\core\Core.types_c.pas',
|
||||
imgproc.types_c in '..\..\..\include\imgproc\imgproc.types_c.pas',
|
||||
imgproc_c in '..\..\..\include\imgproc\imgproc_c.pas',
|
||||
imgproc in '..\..\..\include\imgproc\imgproc.pas',
|
||||
haar in '..\..\..\include\objdetect\haar.pas',
|
||||
objdetect in '..\..\..\include\objdetect\objdetect.pas',
|
||||
core in '..\..\..\include\core\core.pas',
|
||||
cvUtils in '..\..\..\include\cvUtils.pas';
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
Application.Initialize;
|
||||
Application.MainFormOnTaskbar := True;
|
||||
Application.CreateForm(TMainForm, MainForm);
|
||||
Application.Run;
|
||||
end.
|
@ -0,0 +1,198 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{308B90A3-41D8-4848-906A-0F2A07184B49}</ProjectGuid>
|
||||
<ProjectVersion>14.4</ProjectVersion>
|
||||
<FrameworkType>VCL</FrameworkType>
|
||||
<MainSource>LockWorkstation.dpr</MainSource>
|
||||
<Base>True</Base>
|
||||
<Config Condition="'$(Config)'==''">Release</Config>
|
||||
<Platform Condition="'$(Platform)'==''">Win32</Platform>
|
||||
<TargetedPlatforms>1</TargetedPlatforms>
|
||||
<AppType>Application</AppType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
|
||||
<Base_Win32>true</Base_Win32>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
|
||||
<Base_Win64>true</Base_Win64>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
|
||||
<Cfg_1>true</Cfg_1>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
|
||||
<Cfg_1_Win32>true</Cfg_1_Win32>
|
||||
<CfgParent>Cfg_1</CfgParent>
|
||||
<Cfg_1>true</Cfg_1>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
|
||||
<Cfg_2_Win32>true</Cfg_2_Win32>
|
||||
<CfgParent>Cfg_2</CfgParent>
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base)'!=''">
|
||||
<Manifest_File>None</Manifest_File>
|
||||
<Icon_MainIcon>$(BDS)\bin\delphi_PROJECTICON.ico</Icon_MainIcon>
|
||||
<VerInfo_Locale>1049</VerInfo_Locale>
|
||||
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace)</DCC_Namespace>
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||
<DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput>
|
||||
<DCC_ExeOutput>..\..\..\bin\</DCC_ExeOutput>
|
||||
<DCC_E>false</DCC_E>
|
||||
<DCC_N>false</DCC_N>
|
||||
<DCC_S>false</DCC_S>
|
||||
<DCC_F>false</DCC_F>
|
||||
<DCC_K>false</DCC_K>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win32)'!=''">
|
||||
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
|
||||
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||
<DCC_UsePackage>cxPivotGridChartRS17;JvGlobus;JvMM;dxSkinSevenRS17;dxSkinBlueprintRS17;JvManagedThreads;dxSkinHighContrastRS17;dxSkinOffice2007BlackRS17;dxCoreRS17;dac170;cxPageControldxBarPopupMenuRS17;dxSkinXmas2008BlueRS17;dxPSDBTeeChartRS17;GLS_ODE;JvCrypt;dxPSTeeChartRS17;dxSkinSummer2008RS17;dxPScxSchedulerLnkRS17;dxSkinBlueRS17;dxSkinDarkRoomRS17;DBXInterBaseDriver;DataSnapServer;DataSnapCommon;dxPScxTLLnkRS17;JvNet;GLScene_RunTime;officeXPrt;JvDotNetCtrls;dxRibbonRS17;DbxCommonDriver;cxDataRS17;vclimg;dxSkinsdxBarPainterRS17;dxPSdxDBTVLnkRS17;dbxcds;DatasnapConnectorsFreePascal;dxSkinMoneyTwinsRS17;JvXPCtrls;vcldb;cxExportRS17;dxPSCoreRS17;dxBarExtItemsRS17;dxGDIPlusRS17;dxNavBarRS17;CustomIPTransport;cxLibraryRS17;cxGridRS17;dxSkinOffice2010BlackRS17;dsnap;IndyIPServer;unidac170;IndyCore;dxSkinMcSkinRS17;CloudService;dxPScxCommonRS17;FmxTeeUI;frxDB17;dxSkinsdxDLPainterRS17;dxSkiniMaginaryRS17;AnyDAC_PhysDb2_D17;JvDB;JvRuntimeDesign;dxPScxVGridLnkRS17;JclDeveloperTools;unidacfmx170;dxSkinSevenClassicRS17;dxPScxExtCommonRS17;dxPScxSSLnkRS17;dxSkinLilianRS17;fs17;dxPSdxLCLnkRS17;dxSkinOffice2010BlueRS17;bindcompfmx;dclTP_LockBox3;dxSkinOffice2010SilverRS17;vcldbx;cxSchedulerGridRS17;dbrtl;bindcomp;inetdb;JvPluginSystem;dxBarRS17;IcsCommonDXE3Run;DBXOdbcDriver;dxBarDBNavRS17;JvCmp;dxSkinWhiteprintRS17;JvTimeFramework;xmlrtl;dxSkinsdxRibbonPainterRS17;ibxpress;GLSS_OpenAL;dxDockingRS17;bindengine;vclactnband;soaprtl;FMXTee;dxADOServerModeRS17;bindcompvcl;dxBarExtDBItemsRS17;PasLib;Jcl;vclie;dxPSPrVwRibbonRS17;dxSkinOffice2007PinkRS17;IcsFmxDXE3Run;cxPageControlRS17;dxSkinscxPCPainterRS17;AnyDAC_PhysADS_D17;AnyDAC_PhysIB_D17;dxmdsRS17;dxSkinTheAsphaltWorldRS17;DBXInformixDriver;Intraweb;dxPsPrVwAdvRS17;GLSS_FMOD;dxSkinSilverRS17;dxdborRS17;DBXFirebirdDriver;dsnapcon;inet;fsDB17;FFmpegFmx_DXE3;JvPascalInterpreter;vclx;dxSkinStardustRS17;cxEditorsRS17;DBXSybaseASADriver;crcontrols170;dbexpress;EurekaLogCore;IndyIPClient;JvBDE;AnyDAC_PhysMySQL_D17;cxTreeListdxBarPopupMenuRS17;dxSkinVS2010RS17;GLCg_RunTime;GLS_NGD;ZComponent;dxThemeRS17;DBXSqliteDriver;dxPScxGridLnkRS17;fmx;JvDlgs;IndySystem;TeeDB;dxSkinValentineRS17;inetdbbde;vclib;DataSnapClient;dxSkinDevExpressStyleRS17;FFmpegRtl_DXE3;DataSnapProviderClient;DBXSybaseASEDriver;cxBarEditItemRS17;AnyDAC_PhysMSAcc_D17;dxServerModeRS17;cxPivotGridOLAPRS17;cxSchedulerRS17;MetropolisUILiveTile;dxSkinPumpkinRS17;dxPSLnksRS17;AnyDAC_PhysSQLITE_D17;dxPSdxDBOCLnkRS17;cxVerticalGridRS17;dxSkinSpringTimeRS17;vcldsnap;GLS_Computing_RunTime;dacvcl170;dxSkinDevExpressDarkStyleRS17;DBXDb2Driver;AnyDAC_ComI_D17;DBXOracleDriver;dxSkinLiquidSkyRS17;JvCore;AnyDAC_PhysMSSQL_D17;vclribbon;AnyDAC_Comp_D17;cxSpreadSheetRS17;AnyDAC_PhysODBC_D17;fmxase;vcl;dxSkinOffice2007SilverRS17;AnyDAC_PhysPg_D17;CodeSiteExpressPkg;DBXMSSQLDriver;IndyIPCommon;dxPSdxOCLnkRS17;FFmpegVcl_DXE3;dcldxSkinsCoreRS17;JvAppFrm;AnyDAC_PhysASA_D17;inetdbxpress;webdsnap;IcsVclDXE3Run;dxSkinCoffeeRS17;AnyDAC_PhysOracle_D17;JvDocking;adortl;dxSkinscxSchedulerPainterRS17;JvWizards;frx17;JvHMI;dxtrmdRS17;dxPScxPCProdRS17;AnyDAC_GUIxForms_D17;JvBands;ZDbc;rtl;DbxClientDriver;dxTabbedMDIRS17;dxSkinSharpPlusRS17;dxComnRS17;ZPlain;dxSkinsCoreRS17;dxSkinLondonLiquidSkyRS17;dxdbtrRS17;JclContainers;Tee;JvSystem;dxorgcRS17;svnui;dxSkinBlackRS17;JvControls;IndyProtocols;DBXMySQLDriver;dxLayoutControlRS17;bindcompdbx;TeeUI;JvJans;JvPrintPreview;JvPageComps;JvStdCtrls;JvCustom;dxSkinOffice2007BlueRS17;dxPScxPivotGridLnkRS17;dxSpellCheckerRS17;ZCore;vcltouch;dxSkinOffice2007GreenRS17;dxSkinSharpRS17;websnap;dxSkinFoggyRS17;dxTileControlRS17;VclSmp;dxSkinDarkSideRS17;cxPivotGridRS17;DataSnapConnectors;AnyDAC_Phys_D17;dacfmx170;fmxobj;cxTreeListRS17;JclVcl;dxPSdxFCLnkRS17;dxSkinGlassOceansRS17;unidacvcl170;ZParseSql;frxe17;svn;dxFlowChartRS17;fmxdae;dxSkinsdxNavBarPainterRS17;bdertl;ExpertTools;DataSnapIndy10ServerTransport;dxDBXServerModeRS17;dxSkinCaramelRS17;$(DCC_UsePackage)</DCC_UsePackage>
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win64)'!=''">
|
||||
<DCC_UsePackage>cxPivotGridChartRS17;dxSkinSevenRS17;dxSkinBlueprintRS17;dxSkinHighContrastRS17;dxSkinOffice2007BlackRS17;dxCoreRS17;cxPageControldxBarPopupMenuRS17;dxSkinXmas2008BlueRS17;dxPSDBTeeChartRS17;dxPSTeeChartRS17;dxSkinSummer2008RS17;dxPScxSchedulerLnkRS17;dxSkinBlueRS17;dxSkinDarkRoomRS17;DBXInterBaseDriver;DataSnapServer;DataSnapCommon;dxPScxTLLnkRS17;officeXPrt;dxRibbonRS17;DbxCommonDriver;cxDataRS17;vclimg;dxSkinsdxBarPainterRS17;dxPSdxDBTVLnkRS17;dbxcds;DatasnapConnectorsFreePascal;dxSkinMoneyTwinsRS17;vcldb;cxExportRS17;dxPSCoreRS17;dxBarExtItemsRS17;dxGDIPlusRS17;dxNavBarRS17;CustomIPTransport;cxLibraryRS17;cxGridRS17;dxSkinOffice2010BlackRS17;dsnap;IndyIPServer;IndyCore;dxSkinMcSkinRS17;CloudService;dxPScxCommonRS17;FmxTeeUI;dxSkinsdxDLPainterRS17;dxSkiniMaginaryRS17;AnyDAC_PhysDb2_D17;dxPScxVGridLnkRS17;dxSkinSevenClassicRS17;dxPScxExtCommonRS17;dxPScxSSLnkRS17;dxSkinLilianRS17;dxPSdxLCLnkRS17;dxSkinOffice2010BlueRS17;bindcompfmx;dxSkinOffice2010SilverRS17;cxSchedulerGridRS17;dbrtl;bindcomp;inetdb;dxBarRS17;IcsCommonDXE3Run;DBXOdbcDriver;dxBarDBNavRS17;dxSkinWhiteprintRS17;xmlrtl;dxSkinsdxRibbonPainterRS17;ibxpress;dxDockingRS17;bindengine;vclactnband;soaprtl;FMXTee;dxADOServerModeRS17;bindcompvcl;dxBarExtDBItemsRS17;vclie;dxPSPrVwRibbonRS17;dxSkinOffice2007PinkRS17;IcsFmxDXE3Run;cxPageControlRS17;dxSkinscxPCPainterRS17;AnyDAC_PhysADS_D17;AnyDAC_PhysIB_D17;dxmdsRS17;dxSkinTheAsphaltWorldRS17;DBXInformixDriver;Intraweb;dxPsPrVwAdvRS17;dxSkinSilverRS17;dxdborRS17;DBXFirebirdDriver;dsnapcon;inet;vclx;dxSkinStardustRS17;cxEditorsRS17;DBXSybaseASADriver;dbexpress;IndyIPClient;AnyDAC_PhysMySQL_D17;cxTreeListdxBarPopupMenuRS17;dxSkinVS2010RS17;ZComponent;dxThemeRS17;DBXSqliteDriver;dxPScxGridLnkRS17;fmx;IndySystem;TeeDB;dxSkinValentineRS17;vclib;DataSnapClient;dxSkinDevExpressStyleRS17;DataSnapProviderClient;DBXSybaseASEDriver;cxBarEditItemRS17;AnyDAC_PhysMSAcc_D17;dxServerModeRS17;cxPivotGridOLAPRS17;cxSchedulerRS17;MetropolisUILiveTile;dxSkinPumpkinRS17;dxPSLnksRS17;AnyDAC_PhysSQLITE_D17;dxPSdxDBOCLnkRS17;cxVerticalGridRS17;dxSkinSpringTimeRS17;vcldsnap;dxSkinDevExpressDarkStyleRS17;DBXDb2Driver;AnyDAC_ComI_D17;DBXOracleDriver;dxSkinLiquidSkyRS17;AnyDAC_PhysMSSQL_D17;vclribbon;AnyDAC_Comp_D17;cxSpreadSheetRS17;AnyDAC_PhysODBC_D17;fmxase;vcl;dxSkinOffice2007SilverRS17;AnyDAC_PhysPg_D17;DBXMSSQLDriver;IndyIPCommon;dxPSdxOCLnkRS17;dcldxSkinsCoreRS17;AnyDAC_PhysASA_D17;inetdbxpress;webdsnap;IcsVclDXE3Run;dxSkinCoffeeRS17;AnyDAC_PhysOracle_D17;adortl;dxSkinscxSchedulerPainterRS17;dxtrmdRS17;dxPScxPCProdRS17;AnyDAC_GUIxForms_D17;ZDbc;rtl;DbxClientDriver;dxTabbedMDIRS17;dxSkinSharpPlusRS17;dxComnRS17;ZPlain;dxSkinsCoreRS17;dxSkinLondonLiquidSkyRS17;dxdbtrRS17;Tee;dxorgcRS17;dxSkinBlackRS17;IndyProtocols;DBXMySQLDriver;dxLayoutControlRS17;bindcompdbx;TeeUI;dxSkinOffice2007BlueRS17;dxPScxPivotGridLnkRS17;dxSpellCheckerRS17;ZCore;vcltouch;dxSkinOffice2007GreenRS17;dxSkinSharpRS17;websnap;dxSkinFoggyRS17;dxTileControlRS17;VclSmp;dxSkinDarkSideRS17;cxPivotGridRS17;DataSnapConnectors;AnyDAC_Phys_D17;fmxobj;cxTreeListRS17;dxPSdxFCLnkRS17;dxSkinGlassOceansRS17;ZParseSql;dxFlowChartRS17;fmxdae;dxSkinsdxNavBarPainterRS17;DataSnapIndy10ServerTransport;dxDBXServerModeRS17;dxSkinCaramelRS17;$(DCC_UsePackage)</DCC_UsePackage>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1)'!=''">
|
||||
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
|
||||
<DCC_DebugDCUs>true</DCC_DebugDCUs>
|
||||
<DCC_Optimize>false</DCC_Optimize>
|
||||
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
|
||||
<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
|
||||
<DCC_RemoteDebug>true</DCC_RemoteDebug>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
|
||||
<VerInfo_Keys>CompanyName=Mikhail Grigorev;FileDescription=LockWorkstation;FileVersion=1.0.0.0;InternalName=LockWorkstation;LegalCopyright=Mikhail Grigorev;LegalTrademarks=LockWorkstation;OriginalFilename=LockWorkstation;ProductName=LockWorkstation;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||
<DCC_Define>madExcept;$(DCC_Define)</DCC_Define>
|
||||
<DCC_MapFile>3</DCC_MapFile>
|
||||
<VerInfo_AutoIncVersion>true</VerInfo_AutoIncVersion>
|
||||
<Icon_MainIcon>$(BDS)\Neo\OpenCV\Delphi-OpenCV\samples\MultiDemo\OpenCVLockWorkstation\LockWorkstation_Icon.ico</Icon_MainIcon>
|
||||
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||
<DCC_RemoteDebug>false</DCC_RemoteDebug>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2)'!=''">
|
||||
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
|
||||
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
|
||||
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
|
||||
<DCC_DebugInformation>false</DCC_DebugInformation>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
|
||||
<DCC_DebugInformation>true</DCC_DebugInformation>
|
||||
<DCC_LocalDebugSymbols>true</DCC_LocalDebugSymbols>
|
||||
<DCC_MapFile>3</DCC_MapFile>
|
||||
<Icon_MainIcon>$(BDS)\Neo\OpenCV\Delphi-OpenCV\samples\MultiDemo\FaceDetectAndLockWorkstation\LockWorkstation_Icon.ico</Icon_MainIcon>
|
||||
<VerInfo_AutoIncVersion>true</VerInfo_AutoIncVersion>
|
||||
<VerInfo_Keys>CompanyName=Mikhail Grigorev;FileDescription=LockWorkstation;FileVersion=1.0.0.0;InternalName=LockWorkstation;LegalCopyright=Mikhail Grigorev;LegalTrademarks=Mikhail Grigorev;OriginalFilename=LockWorkstation;ProductName=LockWorkstation;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<DelphiCompile Include="$(MainSource)">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="uMainForm.pas">
|
||||
<Form>MainForm</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="..\..\..\include\uLibName.pas"/>
|
||||
<DCCReference Include="..\..\..\include\highgui\highgui_c.pas"/>
|
||||
<DCCReference Include="..\..\..\include\core\core_c.pas"/>
|
||||
<DCCReference Include="..\..\..\include\core\Core.types_c.pas"/>
|
||||
<DCCReference Include="..\..\..\include\imgproc\imgproc.types_c.pas"/>
|
||||
<DCCReference Include="..\..\..\include\imgproc\imgproc_c.pas"/>
|
||||
<DCCReference Include="..\..\..\include\imgproc\imgproc.pas"/>
|
||||
<DCCReference Include="..\..\..\include\objdetect\haar.pas"/>
|
||||
<DCCReference Include="..\..\..\include\objdetect\objdetect.pas"/>
|
||||
<DCCReference Include="..\..\..\include\core\core.pas"/>
|
||||
<DCCReference Include="..\..\..\include\cvUtils.pas"/>
|
||||
<BuildConfiguration Include="Release">
|
||||
<Key>Cfg_2</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Base">
|
||||
<Key>Base</Key>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Debug">
|
||||
<Key>Cfg_1</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
</ItemGroup>
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
|
||||
<Borland.ProjectType/>
|
||||
<BorlandProject>
|
||||
<Delphi.Personality>
|
||||
<VersionInfo>
|
||||
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
|
||||
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
|
||||
<VersionInfo Name="MajorVer">1</VersionInfo>
|
||||
<VersionInfo Name="MinorVer">0</VersionInfo>
|
||||
<VersionInfo Name="Release">0</VersionInfo>
|
||||
<VersionInfo Name="Build">0</VersionInfo>
|
||||
<VersionInfo Name="Debug">False</VersionInfo>
|
||||
<VersionInfo Name="PreRelease">False</VersionInfo>
|
||||
<VersionInfo Name="Special">False</VersionInfo>
|
||||
<VersionInfo Name="Private">False</VersionInfo>
|
||||
<VersionInfo Name="DLL">False</VersionInfo>
|
||||
<VersionInfo Name="Locale">1049</VersionInfo>
|
||||
<VersionInfo Name="CodePage">1251</VersionInfo>
|
||||
</VersionInfo>
|
||||
<VersionInfoKeys>
|
||||
<VersionInfoKeys Name="CompanyName"/>
|
||||
<VersionInfoKeys Name="FileDescription"/>
|
||||
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="InternalName"/>
|
||||
<VersionInfoKeys Name="LegalCopyright"/>
|
||||
<VersionInfoKeys Name="LegalTrademarks"/>
|
||||
<VersionInfoKeys Name="OriginalFilename"/>
|
||||
<VersionInfoKeys Name="ProductName"/>
|
||||
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="Comments"/>
|
||||
<VersionInfoKeys Name="CFBundleName"/>
|
||||
<VersionInfoKeys Name="CFBundleDisplayName"/>
|
||||
<VersionInfoKeys Name="CFBundleIdentifier"/>
|
||||
<VersionInfoKeys Name="CFBundleVersion"/>
|
||||
<VersionInfoKeys Name="CFBundlePackageType"/>
|
||||
<VersionInfoKeys Name="CFBundleSignature"/>
|
||||
<VersionInfoKeys Name="CFBundleAllowMixedLocalizations"/>
|
||||
<VersionInfoKeys Name="CFBundleExecutable"/>
|
||||
</VersionInfoKeys>
|
||||
<Source>
|
||||
<Source Name="MainSource">LockWorkstation.dpr</Source>
|
||||
</Source>
|
||||
<Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k170.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDSBIN)\dclofficexp170.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||
</Excluded_Packages>
|
||||
</Delphi.Personality>
|
||||
<Deployment/>
|
||||
<Platforms>
|
||||
<Platform value="Win32">True</Platform>
|
||||
<Platform value="Win64">False</Platform>
|
||||
</Platforms>
|
||||
</BorlandProject>
|
||||
<ProjectFileVersion>12</ProjectFileVersion>
|
||||
</ProjectExtensions>
|
||||
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
|
||||
<Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
|
||||
</Project>
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 134 KiB |
21
samples/MultiDemo/FaceDetectAndLockWorkstation/clear.bat
Normal file
21
samples/MultiDemo/FaceDetectAndLockWorkstation/clear.bat
Normal file
@ -0,0 +1,21 @@
|
||||
@echo off
|
||||
|
||||
del *.~*
|
||||
del *.dcu
|
||||
del descript.ion
|
||||
del *.ddp
|
||||
del *.map
|
||||
del *.identcache
|
||||
del *.local
|
||||
del *.drc
|
||||
del /S /Q Win32\Release\*.dcu
|
||||
del /S /Q Win64\Release\*.dcu
|
||||
del /S /Q Win32\Release\*.map
|
||||
del /S /Q Win64\Release\*.map
|
||||
del /S /Q Win32\Release\*.drc
|
||||
del /S /Q Win64\Release\*.drc
|
||||
del /S /Q Win32\Release\*.bak
|
||||
del /S /Q Win64\Release\*.bak
|
||||
del /S /Q Win32\Release\*.rsm
|
||||
del /S /Q Win64\Release\*.rsm
|
||||
rd /S /Q __history
|
BIN
samples/MultiDemo/FaceDetectAndLockWorkstation/images.res
Normal file
BIN
samples/MultiDemo/FaceDetectAndLockWorkstation/images.res
Normal file
Binary file not shown.
362
samples/MultiDemo/FaceDetectAndLockWorkstation/uMainForm.dfm
Normal file
362
samples/MultiDemo/FaceDetectAndLockWorkstation/uMainForm.dfm
Normal file
@ -0,0 +1,362 @@
|
||||
object MainForm: TMainForm
|
||||
Left = 0
|
||||
Top = 0
|
||||
BorderIcons = [biSystemMenu, biMinimize]
|
||||
BorderStyle = bsSingle
|
||||
Caption = 'FaceDetect and LockWorkstation'
|
||||
ClientHeight = 256
|
||||
ClientWidth = 585
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
KeyPreview = True
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnCloseQuery = FormCloseQuery
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnKeyDown = FormKeyDown
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object LWFrameOutput: TPaintBox
|
||||
Left = 8
|
||||
Top = 8
|
||||
Width = 320
|
||||
Height = 240
|
||||
end
|
||||
object LWGBFaceDetectSettings: TGroupBox
|
||||
Left = 334
|
||||
Top = 8
|
||||
Width = 244
|
||||
Height = 209
|
||||
Caption = ' Face detect settings '
|
||||
TabOrder = 0
|
||||
object LTotalFaceDetect: TLabel
|
||||
Left = 11
|
||||
Top = 145
|
||||
Width = 86
|
||||
Height = 13
|
||||
Caption = 'Total face detect:'
|
||||
end
|
||||
object LTotalFace: TLabel
|
||||
Left = 101
|
||||
Top = 145
|
||||
Width = 6
|
||||
Height = 13
|
||||
Caption = '0'
|
||||
end
|
||||
object LWLTimerMS: TLabel
|
||||
Left = 190
|
||||
Top = 59
|
||||
Width = 13
|
||||
Height = 13
|
||||
Caption = 'ms'
|
||||
Enabled = False
|
||||
end
|
||||
object LWLWaitTime: TLabel
|
||||
Left = 11
|
||||
Top = 97
|
||||
Width = 52
|
||||
Height = 13
|
||||
Caption = 'Lock timer:'
|
||||
end
|
||||
object LWLWaitTimeMS: TLabel
|
||||
Left = 136
|
||||
Top = 97
|
||||
Width = 16
|
||||
Height = 13
|
||||
Caption = 'sec'
|
||||
end
|
||||
object LWLTotalPCLock: TLabel
|
||||
Left = 11
|
||||
Top = 168
|
||||
Width = 162
|
||||
Height = 13
|
||||
Caption = 'The computer was locked 0 times.'
|
||||
end
|
||||
object LWTimerRadioGroup: TRadioGroup
|
||||
Left = 11
|
||||
Top = 16
|
||||
Width = 209
|
||||
Height = 68
|
||||
Caption = ' Face detect '
|
||||
ItemIndex = 0
|
||||
Items.Strings = (
|
||||
'On application idle'
|
||||
'On timer')
|
||||
TabOrder = 0
|
||||
OnClick = LWTimerRadioGroupClick
|
||||
end
|
||||
object LWSpinEdit: TSpinEdit
|
||||
Left = 123
|
||||
Top = 56
|
||||
Width = 61
|
||||
Height = 22
|
||||
Enabled = False
|
||||
Increment = 100
|
||||
MaxValue = 10000
|
||||
MinValue = 1
|
||||
TabOrder = 1
|
||||
Value = 100
|
||||
OnChange = LWSpinEditChange
|
||||
end
|
||||
object LWSpinEditWaitTime: TSpinEdit
|
||||
Left = 69
|
||||
Top = 94
|
||||
Width = 61
|
||||
Height = 22
|
||||
MaxValue = 1200
|
||||
MinValue = 20
|
||||
TabOrder = 2
|
||||
Value = 120
|
||||
OnChange = LWSpinEditWaitTimeChange
|
||||
end
|
||||
object LWStopLockTimer: TCheckBox
|
||||
Left = 11
|
||||
Top = 122
|
||||
Width = 222
|
||||
Height = 17
|
||||
Caption = 'Stop the lock timer when the face detect'
|
||||
Checked = True
|
||||
State = cbChecked
|
||||
TabOrder = 3
|
||||
end
|
||||
end
|
||||
object LWButtonStartStop: TButton
|
||||
Left = 334
|
||||
Top = 223
|
||||
Width = 123
|
||||
Height = 25
|
||||
Caption = 'Start face detect'
|
||||
TabOrder = 1
|
||||
OnClick = LWButtonStartStopClick
|
||||
end
|
||||
object LWButtonAbout: TButton
|
||||
Left = 463
|
||||
Top = 223
|
||||
Width = 115
|
||||
Height = 25
|
||||
Caption = 'About'
|
||||
TabOrder = 2
|
||||
OnClick = LWButtonAboutClick
|
||||
end
|
||||
object LWTimer: TTimer
|
||||
Enabled = False
|
||||
Interval = 100
|
||||
OnTimer = LWTimerTimer
|
||||
Left = 160
|
||||
Top = 32
|
||||
end
|
||||
object LWCoolTrayIcon: TCoolTrayIcon
|
||||
IconList = LWImageList
|
||||
CycleInterval = 0
|
||||
Icon.Data = {
|
||||
0000010001001010200000000000680400001600000028000000100000002000
|
||||
000001002000000000000004000000000000000000000000000000000000FEFE
|
||||
FE01F8F8F807EEEEEE11DDE4E526D0DBDE2FC8D2D537C2CBCD3DBDC5C842BDC6
|
||||
C942C1CACD3EC8D3D537D2DCDE2FDFE4E526EEEEEE11F8F8F807FEFEFE01FFFF
|
||||
FF00FFFFFF00F6F8FA0D61D6ECE41BCAF2F30CB5E3F30BA1D1F40B9ACBF40BA1
|
||||
D2F40BA8DBF40CBFEAF332E1FAF388DBE3E6F3F6F80FFFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00F6F9FB0D5AD5ECF011C9F3FF00B3E4FF019ED0FF0198CAFF019E
|
||||
D1FF01A5DAFF01BCEAFF29E1FBFF83DBE3F1F4F8F90EFFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00F6F9FB0D5AD5ECF013C8F2FF03B2E1FF049DCDFF0497C7FF059E
|
||||
CEFF05A6D8FF03BBE8FF2ADFFAFF83DBE3F1F4F8F90EFFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00F6F9FB0D5AD5ECF012C8F2FF02B3E3FF029ECFFF0397C9FF039E
|
||||
D0FF03A7D8FF03BCE8FF2ADFF9FF83DAE2F1F4F8F90EFFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00F6F9FB0D5AD5ECF014C7F1FF04B3E2FF049ECEFF0597C9FF059F
|
||||
D0FF04A6D8FF04BBE8FF2BDFF9FF83DAE3F1F4F8F90EFFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00F6F9FB0D5AD5ECF013C7F1FF03B2E2FF039DCEFF0497C8FF049E
|
||||
CFFF04A6D7FF04BBE6FF2BDEF8FF83DAE2F1F4F8F90EFFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00F6F9FB0D5AD5ECF014C7F1FF04B3E1FF059ECEFF0697C8FF069E
|
||||
CFFF06A6D7FF05BBE7FF2BDFF9FF83DAE2F1F4F8F90EFFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00F7F9FB0C68D4EAE13CBCE1FE39A8CFF73796BDF02F89AFF02E8A
|
||||
B1F03496BFF037AACFF64BC9E4FF88D6E1E3F4F8F90EFFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00F7FBFD0CB1B4B6FDD6D9DA80F5F8FA0DF4F7F90DF4F7
|
||||
F90DF5F8FA0DCFD2D47DAEB1B3FFF7FBFC0EFFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00B1B1B1FDD4D4D479FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00CFCFCF76B1B1B1FEFEFEFE01FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00AFAFAFFCCBCBCB7BFFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00C9C9C978B1B1B1FEFEFEFE01FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00BDBDBDDCB7B7B7B7FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00B0B0B0B5C7C7C7DEFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00DFDFDF72ABABABFED1D1D187F7F7F715F6F6
|
||||
F614CACACA85A0A0A0FDE8E8E874FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FDFDFD04D7D7D798B3B3B3FCAAAAAAFEA9A9
|
||||
A9FEB1B1B1FCDBDBDB99FEFEFE04FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00EFEFEF35E2E2E272E2E2
|
||||
E272EDEDED35FEFEFE01FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000000000000000000000}
|
||||
IconVisible = True
|
||||
IconIndex = 0
|
||||
PopupMenu = LWPopupMenu
|
||||
MinimizeToTray = True
|
||||
OnDblClick = LWCoolTrayIconDblClick
|
||||
OnStartup = LWCoolTrayIconStartup
|
||||
Left = 160
|
||||
Top = 88
|
||||
end
|
||||
object LWPopupMenu: TPopupMenu
|
||||
Left = 104
|
||||
Top = 32
|
||||
object LWShow: TMenuItem
|
||||
Caption = 'Show'
|
||||
OnClick = LWCoolTrayIconDblClick
|
||||
end
|
||||
object LWExit: TMenuItem
|
||||
Caption = 'Exit'
|
||||
OnClick = LWExitClick
|
||||
end
|
||||
end
|
||||
object LWImageList: TImageList
|
||||
Left = 160
|
||||
Top = 136
|
||||
Bitmap = {
|
||||
494C010102000500040010001000FFFFFFFFFF00FFFFFFFFFFFFFFFF424D3600
|
||||
0000000000003600000028000000400000001000000001002000000000000010
|
||||
000000000000000000000000000000000000FEFEFE01F8F8F807EEEEEE11DDE4
|
||||
E526D0DBDE2FC8D2D537C2CBCD3DBDC5C842BDC6C942C1CACD3EC8D3D537D2DC
|
||||
DE2FDFE4E526EEEEEE11F8F8F807FEFEFE01FEFEFE01F8F8F807EFEFEF11DEE6
|
||||
E726D3DEE02FCCD6D937C7D0D33DC3CCCF42C3CDD042C6D0D33ECCD7D937D4DF
|
||||
E12FE1E6E626EEEFEF11F8F8F807FEFEFE010000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000FFFFFF00FFFFFF00F6F8FA0D61D6
|
||||
ECE41BCAF2F30CB5E3F30BA1D1F40B9ACBF40BA1D2F40BA8DBF40CBFEAF332E1
|
||||
FAF388DBE3E6F3F6F80FFFFFFF00FFFFFF00FFFFFF00FFFFFF00F6F8FA0D61D6
|
||||
ECE41BCAF2F30CB6E4F30BA1D1F40B9BCBF40BA2D2F40BA9DBF40CBFEAF332E1
|
||||
FBF388DBE3E6F3F6F80FFFFFFF00FFFFFF000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000FFFFFF00FFFFFF00F6F9FB0D5AD5
|
||||
ECF011C9F3FF00B3E4FF019ED0FF0198CAFF019ED1FF01A5DAFF01BCEAFF29E1
|
||||
FBFF83DBE3F1F4F8F90EFFFFFF00FFFFFF00FFFFFF00FFFFFF00F6F9FB0D5AD5
|
||||
ECF011C9F3FF00B3E4FF019ED0FF0198CAFF019ED1FF01A5DAFF01BCEAFF29E1
|
||||
FBFF83DBE3F1F4F8F90EFFFFFF00FFFFFF000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000FFFFFF00FFFFFF00F6F9FB0D5AD5
|
||||
ECF013C8F2FF03B2E1FF049DCDFF0497C7FF059ECEFF05A6D8FF03BBE8FF2ADF
|
||||
FAFF83DBE3F1F4F8F90EFFFFFF00FFFFFF00FFFFFF00FFFFFF00F6F9FB0D5AD5
|
||||
ECF013C8F2FF03B2E1FF049DCDFF0497C7FF059ECEFF05A6D8FF03BBE8FF2ADF
|
||||
FAFF83DBE3F1F4F8F90EFFFFFF00FFFFFF000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000FFFFFF00FFFFFF00F6F9FB0D5AD5
|
||||
ECF012C8F2FF02B3E3FF029ECFFF0397C9FF039ED0FF03A7D8FF03BCE8FF2ADF
|
||||
F9FF83DAE2F1F4F8F90EFFFFFF00FFFFFF00FFFFFF00FFFFFF00F6F9FB0D5AD5
|
||||
ECF012C8F2FF02B3E3FF029ECFFF0397C9FF039ED0FF03A7D8FF03BCE8FF2ADF
|
||||
F9FF83DAE2F1F4F8F90EFFFFFF00FFFFFF000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000FFFFFF00FFFFFF00F6F9FB0D5AD5
|
||||
ECF014C7F1FF04B3E2FF049ECEFF0597C9FF059FD0FF04A6D8FF04BBE8FF2BDF
|
||||
F9FF83DAE3F1F4F8F90EFFFFFF00FFFFFF00FFFFFF00FFFFFF00F6F9FB0D5AD5
|
||||
ECF014C7F1FF04B3E2FF049ECEFF0597C9FF059FD0FF04A6D8FF04BBE8FF2BDF
|
||||
F9FF83DAE3F1F4F8F90EFFFFFF00FFFFFF000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000FFFFFF00FFFFFF00F6F9FB0D5AD5
|
||||
ECF013C7F1FF03B2E2FF039DCEFF0497C8FF049ECFFF04A6D7FF04BBE6FF2BDE
|
||||
F8FF83DAE2F1F4F8F90EFFFFFF00FFFFFF00FFFFFF00FFFFFF00F6F9FB0D5AD5
|
||||
ECF013C7F1FF03B2E2FF039DCEFF0497C8FF049ECFFF04A6D7FF04BBE6FF2BDE
|
||||
F8FF83DAE2F1F4F8F90EFFFFFF00FFFFFF000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000FFFFFF00FFFFFF00F6F9FB0D5AD5
|
||||
ECF014C7F1FF04B3E1FF059ECEFF0697C8FF069ECFFF06A6D7FF05BBE7FF2BDF
|
||||
F9FF83DAE2F1F4F8F90EFFFFFF00FFFFFF00FFFFFF00FFFFFF00F6F9FB0D5AD5
|
||||
ECF014C7F1FF04B3E1FF059ECEFF0697C8FF069ECFFF06A6D7FF05BBE7FF2BDF
|
||||
F9FF83DAE2F1F4F8F90EFFFFFF00FFFFFF000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000FFFFFF00FFFFFF00F7F9FB0C68D4
|
||||
EAE13CBCE1FE39A8CFF73796BDF02F89AFF02E8AB1F03496BFF037AACFF64BC9
|
||||
E4FF88D6E1E3F4F8F90EFFFFFF00FFFFFF00FFFFFF00FFFFFF00F7F9FB0C68D4
|
||||
EAE13CBCE1FE39A8CFF73796BDF02F89AFF02E8AB1F03496BFF039ACD1F04FCD
|
||||
E8F088D6E1E3F4F8F90EFFFFFF00FFFFFF000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00F7FB
|
||||
FD0CB1B4B6FDD6D9DA80F5F8FA0DF4F7F90DF4F7F90DF5F8FA0DCFD2D47DAEB1
|
||||
B3FFF7FBFC0EFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00F7FB
|
||||
FD0CB1B4B6FDD6D9DA80F5F8FA0DF4F7F90DF4F7F90DF5F8FA0DF6F9FB0DF7FA
|
||||
FC0DF8FBFC0CFFFFFF00FFFFFF00FFFFFF000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00B1B1B1FDD4D4D479FFFFFF00FFFFFF00FFFFFF00FFFFFF00CFCFCF76B1B1
|
||||
B1FEFEFEFE01FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00B1B1B1FDD4D4D479FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00AFAFAFFCCBCBCB7BFFFFFF00FFFFFF00FFFFFF00FFFFFF00C9C9C978B1B1
|
||||
B1FEFEFEFE01FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00AFAFAFFCCBCBCB7BFFFFFF00FFFFFF00FFFFFF00FFFFFF00DCDCDC3EC6C6
|
||||
C680FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00BDBDBDDCB7B7B7B7FFFFFF00FFFFFF00FFFFFF00FFFFFF00B0B0B0B5C7C7
|
||||
C7DEFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00BDBDBDDCB8B8B8B6FFFFFF00FFFFFF00FFFFFF00FFFFFF00B0B0B0B5C7C7
|
||||
C7DEFFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00DFDFDF72ABABABFED1D1D187F7F7F715F6F6F614CACACA85A0A0A0FDE8E8
|
||||
E874FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00DFDFDF72ABABABFED1D1D187F7F7F715F6F6F614CACACA86A0A0A0FDE8E8
|
||||
E874FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FDFDFD04D7D7D798B3B3B3FCAAAAAAFEA9A9A9FEB1B1B1FCDBDBDB99FEFE
|
||||
FE04FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FDFDFD04D7D7D798B4B4B4FCAAAAAAFEA8A8A8FEB0B0B0FCDBDBDB99FEFE
|
||||
FE04FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00EFEFEF35E2E2E272E2E2E272EDEDED35FEFEFE01FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00F0F0F035E2E2E272E2E2E272EDEDED35FEFEFE01FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000424D3E000000000000003E000000
|
||||
2800000040000000100000000100010000000000800000000000000000000000
|
||||
000000000000000000000000FFFFFF0000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000000000000000000}
|
||||
end
|
||||
object LWThreadTimer: TJvThreadTimer
|
||||
Interval = 5000
|
||||
OnTimer = LWThreadTimerTimer
|
||||
Left = 80
|
||||
Top = 136
|
||||
end
|
||||
end
|
519
samples/MultiDemo/FaceDetectAndLockWorkstation/uMainForm.pas
Normal file
519
samples/MultiDemo/FaceDetectAndLockWorkstation/uMainForm.pas
Normal file
@ -0,0 +1,519 @@
|
||||
unit uMainForm;
|
||||
|
||||
{$R images.res}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
|
||||
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls, Vcl.StdCtrls, Vcl.Samples.Spin,
|
||||
CoolTrayIcon, core.types_c, core_c, highgui_c, objdetect, cvUtils, Vcl.Menus, Vcl.ImgList,
|
||||
JvComponentBase, JvThreadTimer;
|
||||
|
||||
const
|
||||
WM_NOFACE = WM_USER+1;
|
||||
WM_NOCAMERA = WM_NOFACE+1;
|
||||
|
||||
type
|
||||
pCtx = ^TCtx;
|
||||
TCtx = packed record
|
||||
MyCapture: pCvCapture; // Capture handle
|
||||
MyInputImage: pIplImage; // Input image
|
||||
MyStorage: pCvMemStorage; // Memory storage
|
||||
TotalFaceDetect: Integer; // Total face detect
|
||||
end;
|
||||
TMainForm = class(TForm)
|
||||
LWFrameOutput: TPaintBox;
|
||||
LWTimer: TTimer;
|
||||
LWCoolTrayIcon: TCoolTrayIcon;
|
||||
LWPopupMenu: TPopupMenu;
|
||||
LWShow: TMenuItem;
|
||||
LWExit: TMenuItem;
|
||||
LWImageList: TImageList;
|
||||
LWThreadTimer: TJvThreadTimer;
|
||||
LWGBFaceDetectSettings: TGroupBox;
|
||||
LTotalFaceDetect: TLabel;
|
||||
LTotalFace: TLabel;
|
||||
LWTimerRadioGroup: TRadioGroup;
|
||||
LWSpinEdit: TSpinEdit;
|
||||
LWLTimerMS: TLabel;
|
||||
LWLWaitTime: TLabel;
|
||||
LWSpinEditWaitTime: TSpinEdit;
|
||||
LWLWaitTimeMS: TLabel;
|
||||
LWStopLockTimer: TCheckBox;
|
||||
LWLTotalPCLock: TLabel;
|
||||
LWButtonStartStop: TButton;
|
||||
LWButtonAbout: TButton;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure LWTimerRadioGroupClick(Sender: TObject);
|
||||
procedure LWSpinEditChange(Sender: TObject);
|
||||
procedure LWTimerTimer(Sender: TObject);
|
||||
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
||||
procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||
procedure LWExitClick(Sender: TObject);
|
||||
procedure LWCoolTrayIconDblClick(Sender: TObject);
|
||||
procedure LWCoolTrayIconStartup(Sender: TObject; var ShowMainForm: Boolean);
|
||||
procedure LWThreadTimerTimer(Sender: TObject);
|
||||
procedure LWSpinEditWaitTimeChange(Sender: TObject);
|
||||
procedure LWButtonStartStopClick(Sender: TObject);
|
||||
procedure LWButtonAboutClick(Sender: TObject);
|
||||
private
|
||||
MyCtx: pCtx;
|
||||
FrameBitmap: TBitmap;
|
||||
SessionEnding: Boolean;
|
||||
LWMainFormHidden: Boolean;
|
||||
FintLockedCount: Integer;
|
||||
FrameHeight, FrameWidth: Double;
|
||||
procedure StartCapture;
|
||||
procedure StopCapture;
|
||||
procedure UpdateGetImage;
|
||||
procedure OnIdle(Sender: TObject; var Done: Boolean);
|
||||
procedure WMQueryEndSession(var Message: TMessage); message WM_QUERYENDSESSION;
|
||||
procedure NoFaceRedraw(var mes : TMessage); message WM_NOFACE;
|
||||
procedure NoCameraRedraw(var mes : TMessage); message WM_NOCAMERA;
|
||||
procedure WMPaint(var Message: TWMPaint); message WM_PAINT;
|
||||
procedure DetectAndDraw(const Ctx: pCtx);
|
||||
procedure WndProc(var Message: TMessage); override;
|
||||
procedure AddImageFromResourceToPaintBox(ResID: Integer);
|
||||
function ShowMessageDlgEx(const AText, ACaption: string; const ResID: Integer; Style: Cardinal = MB_OK): Cardinal; overload;
|
||||
function ShowMessageDlgEx(const AText, ACaption: string; const ResName: pChar; Style: Cardinal = MB_OK): Cardinal; overload;
|
||||
public
|
||||
end;
|
||||
|
||||
var
|
||||
MainForm: TMainForm;
|
||||
HaarCascade: pCvHaarClassifierCascade = nil;
|
||||
Cascade_Name: AnsiString = 'FaceDetectXML\haarcascade_frontalface_alt.xml';
|
||||
|
||||
// WTSRegisterSessionNotification
|
||||
// http://msdn.microsoft.com/en-us/library/aa383828%28VS.85%29.aspx
|
||||
// http://msdn.microsoft.com/en-us/library/aa383841%28VS.85%29.aspx
|
||||
function WTSRegisterSessionNotification(hWnd: HWND; dwFlags: DWORD): BOOL; stdcall;
|
||||
function WTSUnRegisterSessionNotification(hWND: HWND): BOOL; stdcall;
|
||||
|
||||
const
|
||||
ProgramsName = 'FaceDetect and LockWorkstation';
|
||||
ProgramsVer = '1.0';
|
||||
// WTSRegisterSessionNotification
|
||||
NOTIFY_FOR_ALL_SESSIONS = 1;
|
||||
NOTIFY_FOR_THIS_SESSIONS = 0;
|
||||
// Res images type
|
||||
NOFACE = 1;
|
||||
NOCAMERA = 2;
|
||||
|
||||
implementation
|
||||
|
||||
procedure BlockInput(ABlockInput: boolean); stdcall; external 'USER32.DLL';
|
||||
// WTSRegisterSessionNotification
|
||||
function WTSRegisterSessionNotification; external 'wtsapi32.dll' Name 'WTSRegisterSessionNotification';
|
||||
function WTSUnRegisterSessionNotification; external 'wtsapi32.dll' Name 'WTSUnRegisterSessionNotification';
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TMainForm.WndProc(var Message: TMessage);
|
||||
begin
|
||||
case Message.Msg of
|
||||
WM_WTSSESSION_CHANGE:
|
||||
begin
|
||||
if Message.wParam = WTS_SESSION_LOCK then
|
||||
begin
|
||||
Inc(FintLockedCount);
|
||||
StopCapture;
|
||||
AddImageFromResourceToPaintBox(NOFACE);
|
||||
end;
|
||||
if Message.wParam = WTS_SESSION_UNLOCK then
|
||||
begin
|
||||
LWLTotalPCLock.Caption := 'The computer was locked ' + IntToStr(FintLockedCount) + ' times.';
|
||||
StartCapture;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
procedure TMainForm.WMQueryEndSession(var Message: TMessage);
|
||||
begin
|
||||
SessionEnding := True;
|
||||
Message.Result := 1;
|
||||
end;
|
||||
|
||||
procedure TMainForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
||||
begin
|
||||
CanClose := ((LWMainFormHidden) or SessionEnding);
|
||||
if not CanClose then
|
||||
begin
|
||||
LWCoolTrayIcon.HideMainForm;
|
||||
LWMainFormHidden := True;
|
||||
LWPopupMenu.Items[0].Caption := 'Show';
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TMainForm.FormKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
begin
|
||||
if Key = VK_ESCAPE then
|
||||
begin
|
||||
LWCoolTrayIcon.HideMainForm;
|
||||
LWMainFormHidden := True;
|
||||
LWPopupMenu.Items[0].Caption := 'Show';
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TMainForm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
Caption := ProgramsName;
|
||||
// WTSRegisterSessionNotification
|
||||
WTSRegisterSessionNotification(Handle, NOTIFY_FOR_ALL_SESSIONS);
|
||||
FintLockedCount := 0;
|
||||
// End
|
||||
LWCoolTrayIcon.Hint := ProgramsName;
|
||||
LWCoolTrayIcon.IconIndex := 1;
|
||||
LWThreadTimer.Interval := LWSpinEditWaitTime.Value*1000;
|
||||
// Çàïóñê çàõâàòà
|
||||
StartCapture;
|
||||
end;
|
||||
|
||||
procedure TMainForm.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
StopCapture;
|
||||
end;
|
||||
|
||||
{ Çàïóñê ïîèñêà ëèöà }
|
||||
procedure TMainForm.StartCapture;
|
||||
begin
|
||||
if not Assigned(MyCtx) then
|
||||
begin
|
||||
MyCtx := nil;
|
||||
MyCtx := AllocMem(SizeOf(TCtx));
|
||||
try
|
||||
MyCtx.MyCapture := cvCreateCameraCapture(CV_CAP_ANY);
|
||||
except
|
||||
on E: Exception do
|
||||
begin
|
||||
ShowMessage('Exception in procedure StartCapture.' + #13 + E.ClassName + ': '+ E.Message);
|
||||
MyCtx := nil;
|
||||
FreeMem(MyCtx, SizeOf(TCtx));
|
||||
AddImageFromResourceToPaintBox(NOCAMERA);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
// Óçíàåì øèðèíó è âûñîòó êàäðà
|
||||
FrameWidth := cvGetCaptureProperty(MyCtx.MyCapture, CV_CAP_PROP_FRAME_WIDTH);
|
||||
FrameHeight := cvGetCaptureProperty(MyCtx.MyCapture, CV_CAP_PROP_FRAME_HEIGHT);
|
||||
//cvSetCaptureProperty(Ctx.MyCapture, CV_CAP_PROP_FRAME_WIDTH, VideoCamWidth);
|
||||
//cvSetCaptureProperty(Ctx.MyCapture, CV_CAP_PROP_FRAME_HEIGHT, VideoCamHeight);
|
||||
// Load the HaarClassifierCascade
|
||||
HaarCascade := cvLoad(pCVChar(@cascade_name[1]), 0, 0, 0);
|
||||
// Check whether the cascade has loaded successfully. Else report and error and quit
|
||||
if not Assigned(HaarCascade) then
|
||||
begin
|
||||
ShowMessage('ERROR: Could not load haar classifier cascade.');
|
||||
LWExitClick(LWExit);
|
||||
end;
|
||||
// Allocate the memory storage
|
||||
MyCtx.MyStorage := cvCreateMemStorage(0);
|
||||
if Assigned(MyCtx.MyCapture) then
|
||||
begin
|
||||
LWButtonStartStop.Caption := 'Stop face detect';
|
||||
LWTimerRadioGroup.Enabled := True;
|
||||
LWSpinEditWaitTime.Enabled := True;
|
||||
LWStopLockTimer.Enabled := True;
|
||||
LWLWaitTime.Enabled := True;
|
||||
LWLWaitTimeMS.Enabled := True;
|
||||
LWSpinEdit.Enabled := LWTimerRadioGroup.ItemIndex = 1;
|
||||
LWLTimerMS.Enabled := LWTimerRadioGroup.ItemIndex = 1;
|
||||
FrameBitmap := TBitmap.Create;
|
||||
FrameBitmap.PixelFormat := pf24bit;
|
||||
UpdateGetImage;
|
||||
end
|
||||
else
|
||||
begin
|
||||
MyCtx := nil;
|
||||
FreeMem(MyCtx, SizeOf(TCtx));
|
||||
AddImageFromResourceToPaintBox(NOCAMERA);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ Îñòàíîâêà ïîèñêà ëèöà }
|
||||
procedure TMainForm.StopCapture;
|
||||
begin
|
||||
try
|
||||
if Assigned(MyCtx) then
|
||||
begin
|
||||
LWTimer.Enabled := False;
|
||||
LWThreadTimer.Enabled := False;
|
||||
LWTimerRadioGroup.Enabled := False;
|
||||
LWSpinEdit.Enabled := False;
|
||||
LWLTimerMS.Enabled := False;
|
||||
LWSpinEditWaitTime.Enabled := False;
|
||||
LWStopLockTimer.Enabled := False;
|
||||
LWLWaitTime.Enabled := False;
|
||||
LWLWaitTimeMS.Enabled := False;
|
||||
Application.OnIdle := nil;
|
||||
if Assigned(MyCtx.MyCapture) then
|
||||
cvReleaseCapture(MyCtx.MyCapture);
|
||||
if Assigned(FrameBitmap) then
|
||||
FrameBitmap.Free;
|
||||
MyCtx := nil;
|
||||
FreeMem(MyCtx, SizeOf(TCtx));
|
||||
LWButtonStartStop.Caption := 'Start face detect';
|
||||
end;
|
||||
except
|
||||
on E: Exception do
|
||||
ShowMessage('Exception in procedure StopCapture.' + #13 + E.ClassName + ': '+ E.Message);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TMainForm.LWButtonAboutClick(Sender: TObject);
|
||||
begin
|
||||
ShowMessageDlgEx(ProgramsName+#13+'Version: '+ProgramsVer+#13+'Copyright © 2013 by Mikhail Grigorev'+#13+'www.im-history.ru'+#13+'sleuthhound@gmail.com', ProgramsName+' - About', 'ABOUT');
|
||||
end;
|
||||
|
||||
{ Çàïóñê\îñòàíîâêà ïîèñêà ëèöà }
|
||||
procedure TMainForm.LWButtonStartStopClick(Sender: TObject);
|
||||
begin
|
||||
if Assigned(MyCtx) then
|
||||
begin
|
||||
StopCapture;
|
||||
AddImageFromResourceToPaintBox(NOFACE);
|
||||
end
|
||||
else
|
||||
StartCapture;
|
||||
end;
|
||||
|
||||
{ Êëèê ïî ïóíêòó Ñêðûòü/Ïîêàçàòü êîíòåêñòíîãî ìåíþ â òðåå }
|
||||
procedure TMainForm.LWCoolTrayIconDblClick(Sender: TObject);
|
||||
begin
|
||||
if LWMainFormHidden then
|
||||
begin
|
||||
LWCoolTrayIcon.ShowMainForm;
|
||||
LWMainFormHidden := False;
|
||||
LWPopupMenu.Items[0].Caption := 'Hide';
|
||||
end
|
||||
else
|
||||
begin
|
||||
Application.Minimize;
|
||||
LWCoolTrayIcon.HideMainForm;
|
||||
LWMainFormHidden := True;
|
||||
LWPopupMenu.Items[0].Caption := 'Show';
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TMainForm.LWCoolTrayIconStartup(Sender: TObject; var ShowMainForm: Boolean);
|
||||
begin
|
||||
ShowMainForm := False;
|
||||
LWMainFormHidden := True;
|
||||
end;
|
||||
|
||||
{ Âûõîä èç ïðîãðàììû }
|
||||
procedure TMainForm.LWExitClick(Sender: TObject);
|
||||
begin
|
||||
LWMainFormHidden := True;
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TMainForm.OnIdle(Sender: TObject; var Done: Boolean);
|
||||
begin
|
||||
MyCtx.MyInputImage := cvQueryFrame(MyCtx.MyCapture);
|
||||
if Assigned(MyCtx.MyInputImage) then
|
||||
begin
|
||||
DetectAndDraw(MyCtx);
|
||||
if LWStopLockTimer.Checked then
|
||||
begin
|
||||
if MyCtx.TotalFaceDetect = 0 then
|
||||
LWThreadTimer.Enabled := True
|
||||
else
|
||||
LWThreadTimer.Enabled := False;
|
||||
end
|
||||
else
|
||||
LWThreadTimer.Enabled := True;
|
||||
LWCoolTrayIcon.Hint := Format('%s (Total face: %s)', [ProgramsName, IntToStr(MyCtx.TotalFaceDetect)]);
|
||||
LTotalFace.Caption := IntToStr(MyCtx.TotalFaceDetect);
|
||||
if not LWMainFormHidden then
|
||||
begin
|
||||
IplImage2Bitmap(MyCtx.MyInputImage, FrameBitmap);
|
||||
LWFrameOutput.Canvas.StretchDraw(LWFrameOutput.ClientRect, FrameBitmap);
|
||||
end;
|
||||
Done := False;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Application.OnIdle := nil;
|
||||
LWThreadTimer.Enabled := False;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TMainForm.LWThreadTimerTimer(Sender: TObject);
|
||||
begin
|
||||
if MyCtx.TotalFaceDetect = 0 then
|
||||
LockWorkStation();
|
||||
{ BlockInput(True) // Îòêëþ÷èòü ñðåäñòâà ââîäà (êëàâèàòóðó è ìûøü)
|
||||
else
|
||||
BlockInput(False); // Âêëþ÷èòü ñðåäñòâà ââîäà (êëàâèàòóðó è ìûøü)
|
||||
}
|
||||
end;
|
||||
|
||||
procedure TMainForm.LWTimerRadioGroupClick(Sender: TObject);
|
||||
begin
|
||||
if Assigned(MyCtx) then
|
||||
begin
|
||||
UpdateGetImage;
|
||||
LWSpinEdit.Enabled := LWTimerRadioGroup.ItemIndex = 1;
|
||||
LWLTimerMS.Enabled := LWTimerRadioGroup.ItemIndex = 1;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TMainForm.LWSpinEditChange(Sender: TObject);
|
||||
begin
|
||||
LWTimer.Interval := LWSpinEdit.Value;
|
||||
end;
|
||||
|
||||
procedure TMainForm.LWSpinEditWaitTimeChange(Sender: TObject);
|
||||
begin
|
||||
LWThreadTimer.Enabled := False;
|
||||
LWThreadTimer.Interval := LWSpinEditWaitTime.Value*1000;
|
||||
LWThreadTimer.Enabled := True;
|
||||
end;
|
||||
|
||||
procedure TMainForm.LWTimerTimer(Sender: TObject);
|
||||
var
|
||||
Done: Boolean;
|
||||
begin
|
||||
OnIdle(nil, Done);
|
||||
end;
|
||||
|
||||
procedure TMainForm.UpdateGetImage;
|
||||
begin
|
||||
if Assigned(MyCtx.MyCapture) then
|
||||
case LWTimerRadioGroup.ItemIndex of
|
||||
0:
|
||||
begin
|
||||
LWTimer.Enabled := False;
|
||||
Application.OnIdle := OnIdle;
|
||||
end;
|
||||
1:
|
||||
begin
|
||||
Application.OnIdle := nil;
|
||||
LWTimer.Enabled := True;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TMainForm.DetectAndDraw(const Ctx: pCtx);
|
||||
var
|
||||
Scale: Integer;
|
||||
Temp: pIplImage;
|
||||
Pt1, Pt2: TCvPoint;
|
||||
I: Integer;
|
||||
Faces: pCvSeq;
|
||||
R: pCvRect;
|
||||
begin
|
||||
Scale := 1;
|
||||
Temp := cvCreateImage(cvSize(Ctx.MyInputImage^.width div Scale, Ctx.MyInputImage^.height div Scale), 8, 3);
|
||||
cvClearMemStorage(Ctx.MyStorage);
|
||||
if Assigned(HaarCascade) then
|
||||
begin
|
||||
Faces := cvHaarDetectObjects(Ctx.MyInputImage, HaarCascade, Ctx.MyStorage, 1.1, 2, CV_HAAR_DO_CANNY_PRUNING, cvSize(40, 40), cvSize(0, 0));
|
||||
Ctx.TotalFaceDetect := Faces^.total;
|
||||
for I := 1 to Faces^.total do
|
||||
begin
|
||||
R := pCvRect(cvGetSeqElem(Faces, I));
|
||||
Pt1.x := R^.x * Scale;
|
||||
Pt2.x := (R^.x + R^.width) * Scale;
|
||||
Pt1.y := R^.y * Scale;
|
||||
Pt2.y := (R^.y + R^.height) * Scale;
|
||||
cvRectangle(Ctx.MyInputImage, Pt1, Pt2, CV_RGB(255, 0, 0), 3, 8, 0);
|
||||
end;
|
||||
end;
|
||||
cvReleaseImage(Temp);
|
||||
end;
|
||||
|
||||
{ Äîáàâëåíèå êàðòèíêè èç Resource â PaintBox }
|
||||
procedure TMainForm.AddImageFromResourceToPaintBox(ResID: Integer);
|
||||
var
|
||||
Bitmap: TBitmap;
|
||||
begin
|
||||
Bitmap := TBitmap.Create;
|
||||
try
|
||||
if ResID = NOFACE then
|
||||
Bitmap.LoadFromResourceName(HInstance, 'NOFACE')
|
||||
else if ResID = NOCAMERA then
|
||||
Bitmap.LoadFromResourceName(HInstance, 'NOCAMERA');
|
||||
LWFrameOutput.Canvas.StretchDraw(LWFrameOutput.ClientRect, Bitmap);
|
||||
LWFrameOutput.Tag := ResID;
|
||||
finally
|
||||
Bitmap.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TMainForm.WMPaint(var Message: TWMPaint);
|
||||
var
|
||||
PS: TPaintStruct;
|
||||
begin
|
||||
BeginPaint(Handle, PS);
|
||||
if not LWMainFormHidden then
|
||||
begin
|
||||
if LWFrameOutput.Tag = NOFACE then
|
||||
PostMessage(Handle, WM_NOFACE, 0, 0)
|
||||
else if LWFrameOutput.Tag = NOCAMERA then
|
||||
PostMessage(Handle, WM_NOCAMERA, 0, 0);
|
||||
end;
|
||||
EndPaint(Handle, PS);
|
||||
end;
|
||||
|
||||
procedure TMainForm.NoFaceRedraw(var Mes: TMessage);
|
||||
begin
|
||||
AddImageFromResourceToPaintBox(NOFACE);
|
||||
end;
|
||||
|
||||
procedure TMainForm.NoCameraRedraw(var Mes: TMessage);
|
||||
begin
|
||||
AddImageFromResourceToPaintBox(NOCAMERA);
|
||||
end;
|
||||
|
||||
{ Ïîêàçûâàåì ñâîå äèàëîãîâîå îêíî }
|
||||
function TMainForm.ShowMessageDlgEx(const AText, ACaption: string; const ResID: Integer; Style: Cardinal = MB_OK): Cardinal;
|
||||
var
|
||||
lpMsgBoxParams : MsgBoxParams;
|
||||
begin
|
||||
with lpMsgBoxParams do
|
||||
begin
|
||||
cbSize := SizeOf(lpMsgBoxParams);
|
||||
hwndOwner := Application.Handle;
|
||||
hInstance := SysInit.hInstance;
|
||||
lpszText := PChar(AText);
|
||||
lpszCaption := PChar(ACaption);
|
||||
dwStyle := MB_USERICON or MB_TOPMOST or Style;
|
||||
lpszIcon := MAKEINTRESOURCE(ResID);
|
||||
dwContextHelpID := 0;
|
||||
lpfnMsgBoxCallback := nil;
|
||||
dwLanguageId := LANG_ENGLISH;
|
||||
end;
|
||||
Result := Cardinal(MessageBoxIndirect(lpMsgBoxParams));
|
||||
end;
|
||||
|
||||
{ Ïîêàçûâàåì ñâîå äèàëîãîâîå îêíî }
|
||||
function TMainForm.ShowMessageDlgEx(const AText, ACaption: string; const ResName: pChar; Style: Cardinal = MB_OK): Cardinal;
|
||||
var
|
||||
lpMsgBoxParams : MsgBoxParams;
|
||||
begin
|
||||
with lpMsgBoxParams do
|
||||
begin
|
||||
cbSize := SizeOf(lpMsgBoxParams);
|
||||
hwndOwner := Application.Handle;
|
||||
hInstance := SysInit.hInstance;
|
||||
lpszText := PChar(AText);
|
||||
lpszCaption := PChar(ACaption);
|
||||
dwStyle := MB_USERICON or MB_TOPMOST or Style;
|
||||
lpszIcon := ResName;
|
||||
dwContextHelpID := 0;
|
||||
lpfnMsgBoxCallback := nil;
|
||||
dwLanguageId := LANG_ENGLISH;
|
||||
end;
|
||||
Result := Cardinal(MessageBoxIndirect(lpMsgBoxParams));
|
||||
end;
|
||||
|
||||
end.
|
@ -0,0 +1,6 @@
|
||||
[LWFrameOutput]
|
||||
Coordinates=256,1,95,33
|
||||
|
||||
[]
|
||||
Coordinates=82,77,72,33
|
||||
|
@ -216,6 +216,9 @@
|
||||
<Projects Include="MultiDemo\CarNumDetect\CarNumDetect.dproj">
|
||||
<Dependencies/>
|
||||
</Projects>
|
||||
<Projects Include="MultiDemo\FaceDetectAndLockWorkstation\LockWorkstation.dproj">
|
||||
<Dependencies/>
|
||||
</Projects>
|
||||
</ItemGroup>
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>Default.Personality.12</Borland.Personality>
|
||||
@ -863,14 +866,23 @@
|
||||
<Target Name="CarNumDetect:Make">
|
||||
<MSBuild Projects="MultiDemo\CarNumDetect\CarNumDetect.dproj" Targets="Make"/>
|
||||
</Target>
|
||||
<Target Name="LockWorkstation">
|
||||
<MSBuild Projects="MultiDemo\FaceDetectAndLockWorkstation\LockWorkstation.dproj"/>
|
||||
</Target>
|
||||
<Target Name="LockWorkstation:Clean">
|
||||
<MSBuild Projects="MultiDemo\FaceDetectAndLockWorkstation\LockWorkstation.dproj" Targets="Clean"/>
|
||||
</Target>
|
||||
<Target Name="LockWorkstation:Make">
|
||||
<MSBuild Projects="MultiDemo\FaceDetectAndLockWorkstation\LockWorkstation.dproj" Targets="Make"/>
|
||||
</Target>
|
||||
<Target Name="Build">
|
||||
<CallTarget Targets="cv_AddWeighted;cvSetImageROI_cvAddWeighted;cv_And;cv_Canny;cv_CopyMakeBorder;cv_CreateCameraCapture;cv_CreateTrackbar;cv_CreateVideoWriter;cv_CvtColor;cv_CvtPixToPlane;cvErode_cvDilate;cv_FindContours;cv_FloodFill;cv_GetSubRect;cv_HoughCircles;cv_HoughLines2;cv_InRangeS;cv_Laplace;cv_LoadImage;cv_LoadImage2;cv_LoadVideo;cv_MorphologyEx;cv_RandInt;cv_Resize;cv_SetImageROI;cv_SetImageROI2;cv_SetMouseCallback;cv_Smooth;cv_Sobel;cvSplit_cvMerge;cv_Save;cv_Sub;cvThreshold_cvAdaptiveThreshold;cv_WarpPerspective;cv_MatchShapes;cv_WarpAffine;cv_SnakeImage;cv_CalcOpticalFlowPyrLK;cv_CreateGaussianBGModel;cv_CreateFGDStatModel;cvCodeBook;cv_FindContours2;cv_CreateStructuringElementEx;cv_LinearPolar;cvMotion;cv_PyrSegmentation;cv_LoadHaarClassifierCascade;cv_AdaptiveSkinDetector;cv_ExtractSURF;cv_ExtractSURF2;cv_MatchTemplate;cv_CalcHist;cv_Integral;HelloWorld;VideoProcessing;FaceDetect;Stereo;CameraCaptureAndFindContours;HandsDetect;Squares;CameraCalibrate;CameraShift;minarea;fback_c;FrameRecon;mmdt;VCLCameraCapture;MotionDetect;latentsvmdetect;Mat;CarNumDetect"/>
|
||||
<CallTarget Targets="cv_AddWeighted;cvSetImageROI_cvAddWeighted;cv_And;cv_Canny;cv_CopyMakeBorder;cv_CreateCameraCapture;cv_CreateTrackbar;cv_CreateVideoWriter;cv_CvtColor;cv_CvtPixToPlane;cvErode_cvDilate;cv_FindContours;cv_FloodFill;cv_GetSubRect;cv_HoughCircles;cv_HoughLines2;cv_InRangeS;cv_Laplace;cv_LoadImage;cv_LoadImage2;cv_LoadVideo;cv_MorphologyEx;cv_RandInt;cv_Resize;cv_SetImageROI;cv_SetImageROI2;cv_SetMouseCallback;cv_Smooth;cv_Sobel;cvSplit_cvMerge;cv_Save;cv_Sub;cvThreshold_cvAdaptiveThreshold;cv_WarpPerspective;cv_MatchShapes;cv_WarpAffine;cv_SnakeImage;cv_CalcOpticalFlowPyrLK;cv_CreateGaussianBGModel;cv_CreateFGDStatModel;cvCodeBook;cv_FindContours2;cv_CreateStructuringElementEx;cv_LinearPolar;cvMotion;cv_PyrSegmentation;cv_LoadHaarClassifierCascade;cv_AdaptiveSkinDetector;cv_ExtractSURF;cv_ExtractSURF2;cv_MatchTemplate;cv_CalcHist;cv_Integral;HelloWorld;VideoProcessing;FaceDetect;Stereo;CameraCaptureAndFindContours;HandsDetect;Squares;CameraCalibrate;CameraShift;minarea;fback_c;FrameRecon;mmdt;VCLCameraCapture;MotionDetect;latentsvmdetect;Mat;CarNumDetect;LockWorkstation"/>
|
||||
</Target>
|
||||
<Target Name="Clean">
|
||||
<CallTarget Targets="cv_AddWeighted:Clean;cvSetImageROI_cvAddWeighted:Clean;cv_And:Clean;cv_Canny:Clean;cv_CopyMakeBorder:Clean;cv_CreateCameraCapture:Clean;cv_CreateTrackbar:Clean;cv_CreateVideoWriter:Clean;cv_CvtColor:Clean;cv_CvtPixToPlane:Clean;cvErode_cvDilate:Clean;cv_FindContours:Clean;cv_FloodFill:Clean;cv_GetSubRect:Clean;cv_HoughCircles:Clean;cv_HoughLines2:Clean;cv_InRangeS:Clean;cv_Laplace:Clean;cv_LoadImage:Clean;cv_LoadImage2:Clean;cv_LoadVideo:Clean;cv_MorphologyEx:Clean;cv_RandInt:Clean;cv_Resize:Clean;cv_SetImageROI:Clean;cv_SetImageROI2:Clean;cv_SetMouseCallback:Clean;cv_Smooth:Clean;cv_Sobel:Clean;cvSplit_cvMerge:Clean;cv_Save:Clean;cv_Sub:Clean;cvThreshold_cvAdaptiveThreshold:Clean;cv_WarpPerspective:Clean;cv_MatchShapes:Clean;cv_WarpAffine:Clean;cv_SnakeImage:Clean;cv_CalcOpticalFlowPyrLK:Clean;cv_CreateGaussianBGModel:Clean;cv_CreateFGDStatModel:Clean;cvCodeBook:Clean;cv_FindContours2:Clean;cv_CreateStructuringElementEx:Clean;cv_LinearPolar:Clean;cvMotion:Clean;cv_PyrSegmentation:Clean;cv_LoadHaarClassifierCascade:Clean;cv_AdaptiveSkinDetector:Clean;cv_ExtractSURF:Clean;cv_ExtractSURF2:Clean;cv_MatchTemplate:Clean;cv_CalcHist:Clean;cv_Integral:Clean;HelloWorld:Clean;VideoProcessing:Clean;FaceDetect:Clean;Stereo:Clean;CameraCaptureAndFindContours:Clean;HandsDetect:Clean;Squares:Clean;CameraCalibrate:Clean;CameraShift:Clean;minarea:Clean;fback_c:Clean;FrameRecon:Clean;mmdt:Clean;VCLCameraCapture:Clean;MotionDetect:Clean;latentsvmdetect:Clean;Mat:Clean;CarNumDetect:Clean"/>
|
||||
<CallTarget Targets="cv_AddWeighted:Clean;cvSetImageROI_cvAddWeighted:Clean;cv_And:Clean;cv_Canny:Clean;cv_CopyMakeBorder:Clean;cv_CreateCameraCapture:Clean;cv_CreateTrackbar:Clean;cv_CreateVideoWriter:Clean;cv_CvtColor:Clean;cv_CvtPixToPlane:Clean;cvErode_cvDilate:Clean;cv_FindContours:Clean;cv_FloodFill:Clean;cv_GetSubRect:Clean;cv_HoughCircles:Clean;cv_HoughLines2:Clean;cv_InRangeS:Clean;cv_Laplace:Clean;cv_LoadImage:Clean;cv_LoadImage2:Clean;cv_LoadVideo:Clean;cv_MorphologyEx:Clean;cv_RandInt:Clean;cv_Resize:Clean;cv_SetImageROI:Clean;cv_SetImageROI2:Clean;cv_SetMouseCallback:Clean;cv_Smooth:Clean;cv_Sobel:Clean;cvSplit_cvMerge:Clean;cv_Save:Clean;cv_Sub:Clean;cvThreshold_cvAdaptiveThreshold:Clean;cv_WarpPerspective:Clean;cv_MatchShapes:Clean;cv_WarpAffine:Clean;cv_SnakeImage:Clean;cv_CalcOpticalFlowPyrLK:Clean;cv_CreateGaussianBGModel:Clean;cv_CreateFGDStatModel:Clean;cvCodeBook:Clean;cv_FindContours2:Clean;cv_CreateStructuringElementEx:Clean;cv_LinearPolar:Clean;cvMotion:Clean;cv_PyrSegmentation:Clean;cv_LoadHaarClassifierCascade:Clean;cv_AdaptiveSkinDetector:Clean;cv_ExtractSURF:Clean;cv_ExtractSURF2:Clean;cv_MatchTemplate:Clean;cv_CalcHist:Clean;cv_Integral:Clean;HelloWorld:Clean;VideoProcessing:Clean;FaceDetect:Clean;Stereo:Clean;CameraCaptureAndFindContours:Clean;HandsDetect:Clean;Squares:Clean;CameraCalibrate:Clean;CameraShift:Clean;minarea:Clean;fback_c:Clean;FrameRecon:Clean;mmdt:Clean;VCLCameraCapture:Clean;MotionDetect:Clean;latentsvmdetect:Clean;Mat:Clean;CarNumDetect:Clean;LockWorkstation:Clean"/>
|
||||
</Target>
|
||||
<Target Name="Make">
|
||||
<CallTarget Targets="cv_AddWeighted:Make;cvSetImageROI_cvAddWeighted:Make;cv_And:Make;cv_Canny:Make;cv_CopyMakeBorder:Make;cv_CreateCameraCapture:Make;cv_CreateTrackbar:Make;cv_CreateVideoWriter:Make;cv_CvtColor:Make;cv_CvtPixToPlane:Make;cvErode_cvDilate:Make;cv_FindContours:Make;cv_FloodFill:Make;cv_GetSubRect:Make;cv_HoughCircles:Make;cv_HoughLines2:Make;cv_InRangeS:Make;cv_Laplace:Make;cv_LoadImage:Make;cv_LoadImage2:Make;cv_LoadVideo:Make;cv_MorphologyEx:Make;cv_RandInt:Make;cv_Resize:Make;cv_SetImageROI:Make;cv_SetImageROI2:Make;cv_SetMouseCallback:Make;cv_Smooth:Make;cv_Sobel:Make;cvSplit_cvMerge:Make;cv_Save:Make;cv_Sub:Make;cvThreshold_cvAdaptiveThreshold:Make;cv_WarpPerspective:Make;cv_MatchShapes:Make;cv_WarpAffine:Make;cv_SnakeImage:Make;cv_CalcOpticalFlowPyrLK:Make;cv_CreateGaussianBGModel:Make;cv_CreateFGDStatModel:Make;cvCodeBook:Make;cv_FindContours2:Make;cv_CreateStructuringElementEx:Make;cv_LinearPolar:Make;cvMotion:Make;cv_PyrSegmentation:Make;cv_LoadHaarClassifierCascade:Make;cv_AdaptiveSkinDetector:Make;cv_ExtractSURF:Make;cv_ExtractSURF2:Make;cv_MatchTemplate:Make;cv_CalcHist:Make;cv_Integral:Make;HelloWorld:Make;VideoProcessing:Make;FaceDetect:Make;Stereo:Make;CameraCaptureAndFindContours:Make;HandsDetect:Make;Squares:Make;CameraCalibrate:Make;CameraShift:Make;minarea:Make;fback_c:Make;FrameRecon:Make;mmdt:Make;VCLCameraCapture:Make;MotionDetect:Make;latentsvmdetect:Make;Mat:Make;CarNumDetect:Make"/>
|
||||
<CallTarget Targets="cv_AddWeighted:Make;cvSetImageROI_cvAddWeighted:Make;cv_And:Make;cv_Canny:Make;cv_CopyMakeBorder:Make;cv_CreateCameraCapture:Make;cv_CreateTrackbar:Make;cv_CreateVideoWriter:Make;cv_CvtColor:Make;cv_CvtPixToPlane:Make;cvErode_cvDilate:Make;cv_FindContours:Make;cv_FloodFill:Make;cv_GetSubRect:Make;cv_HoughCircles:Make;cv_HoughLines2:Make;cv_InRangeS:Make;cv_Laplace:Make;cv_LoadImage:Make;cv_LoadImage2:Make;cv_LoadVideo:Make;cv_MorphologyEx:Make;cv_RandInt:Make;cv_Resize:Make;cv_SetImageROI:Make;cv_SetImageROI2:Make;cv_SetMouseCallback:Make;cv_Smooth:Make;cv_Sobel:Make;cvSplit_cvMerge:Make;cv_Save:Make;cv_Sub:Make;cvThreshold_cvAdaptiveThreshold:Make;cv_WarpPerspective:Make;cv_MatchShapes:Make;cv_WarpAffine:Make;cv_SnakeImage:Make;cv_CalcOpticalFlowPyrLK:Make;cv_CreateGaussianBGModel:Make;cv_CreateFGDStatModel:Make;cvCodeBook:Make;cv_FindContours2:Make;cv_CreateStructuringElementEx:Make;cv_LinearPolar:Make;cvMotion:Make;cv_PyrSegmentation:Make;cv_LoadHaarClassifierCascade:Make;cv_AdaptiveSkinDetector:Make;cv_ExtractSURF:Make;cv_ExtractSURF2:Make;cv_MatchTemplate:Make;cv_CalcHist:Make;cv_Integral:Make;HelloWorld:Make;VideoProcessing:Make;FaceDetect:Make;Stereo:Make;CameraCaptureAndFindContours:Make;HandsDetect:Make;Squares:Make;CameraCalibrate:Make;CameraShift:Make;minarea:Make;fback_c:Make;FrameRecon:Make;mmdt:Make;VCLCameraCapture:Make;MotionDetect:Make;latentsvmdetect:Make;Mat:Make;CarNumDetect:Make;LockWorkstation:Make"/>
|
||||
</Target>
|
||||
<Import Project="$(BDS)\Bin\CodeGear.Group.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Group.Targets')"/>
|
||||
</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user