mirror of
https://github.com/Laex/Delphi-OpenCV.git
synced 2024-11-15 07:45:53 +01:00
FaceRecognizer class
Signed-off-by: Laentir Valetov <laex@bk.ru>
This commit is contained in:
parent
4530fecec1
commit
834bbcbade
4
.gitignore
vendored
4
.gitignore
vendored
@ -8,8 +8,8 @@ lib
|
||||
/resource/result/*.*
|
||||
*.exe
|
||||
*.dll
|
||||
!opencv_classes249.dll
|
||||
!opencv_classes249d.dll
|
||||
!opencv_classes2413d.dll
|
||||
!opencv_classes2413.dll
|
||||
#Files
|
||||
*.ini
|
||||
*.bsc
|
||||
|
BIN
bin/Win32/opencv_classes2413.dll
Normal file
BIN
bin/Win32/opencv_classes2413.dll
Normal file
Binary file not shown.
BIN
bin/Win32/opencv_classes2413d.dll
Normal file
BIN
bin/Win32/opencv_classes2413d.dll
Normal file
Binary file not shown.
57
samples/сlasses/FaceRecognizer/FaceRecognizer.dpr
Normal file
57
samples/сlasses/FaceRecognizer/FaceRecognizer.dpr
Normal file
@ -0,0 +1,57 @@
|
||||
program FaceRecognizer;
|
||||
|
||||
{$APPTYPE CONSOLE}
|
||||
{$R *.res}
|
||||
|
||||
uses
|
||||
System.SysUtils,
|
||||
ocv.core.types_c in '..\..\..\source\ocv.core.types_c.pas',
|
||||
ocv.highgui_c in '..\..\..\source\ocv.highgui_c.pas',
|
||||
ocv.imgproc.types_c in '..\..\..\source\ocv.imgproc.types_c.pas',
|
||||
ocv.imgproc_c in '..\..\..\source\ocv.imgproc_c.pas',
|
||||
ocv.lib in '..\..\..\source\ocv.lib.pas',
|
||||
uResourcePaths in '..\..\..\source\utils\uResourcePaths.pas',
|
||||
ocv.cls.contrib in '..\..\..\source\Classes\ocv.cls.contrib.pas',
|
||||
ocv.cls.types in '..\..\..\source\Classes\ocv.cls.types.pas';
|
||||
|
||||
Var
|
||||
P : IFaceRecognizer;
|
||||
f : TInputArrayOfArrays;
|
||||
l : TInputArray;
|
||||
i : pIplImage;
|
||||
lab : Integer;
|
||||
confidence: double;
|
||||
|
||||
begin
|
||||
try
|
||||
P := TFaceRecognizer.createEigenFaceRecognizer;
|
||||
SetLength(f, 6);
|
||||
SetLength(l, 6);
|
||||
f[0] := cvLoadImage(cResourceFaces + 's1\1.pgm', CV_LOAD_IMAGE_GRAYSCALE);
|
||||
l[0] := 0;
|
||||
f[1] := cvLoadImage(cResourceFaces + 's1\2.pgm', CV_LOAD_IMAGE_GRAYSCALE);
|
||||
l[1] := 0;
|
||||
f[2] := cvLoadImage(cResourceFaces + 's1\3.pgm', CV_LOAD_IMAGE_GRAYSCALE);
|
||||
l[2] := 0;
|
||||
f[3] := cvLoadImage(cResourceFaces + 's2\1.pgm', CV_LOAD_IMAGE_GRAYSCALE);
|
||||
l[3] := 1;
|
||||
f[4] := cvLoadImage(cResourceFaces + 's2\2.pgm', CV_LOAD_IMAGE_GRAYSCALE);
|
||||
l[4] := 1;
|
||||
f[5] := cvLoadImage(cResourceFaces + 's2\3.pgm', CV_LOAD_IMAGE_GRAYSCALE);
|
||||
l[5] := 1;
|
||||
P.train(f, l);
|
||||
i := cvLoadImage(cResourceFaces + 's1\5.pgm', CV_LOAD_IMAGE_GRAYSCALE);
|
||||
P.predict(i,lab,confidence);
|
||||
Writeln('Label: ', lab);
|
||||
Writeln('Confidence: ',confidence:3:1);
|
||||
P := nil;
|
||||
|
||||
//need free f array
|
||||
|
||||
Readln;
|
||||
except
|
||||
on E: Exception do
|
||||
Writeln(E.ClassName, ': ', E.Message);
|
||||
end;
|
||||
|
||||
end.
|
643
samples/сlasses/FaceRecognizer/FaceRecognizer.dproj
Normal file
643
samples/сlasses/FaceRecognizer/FaceRecognizer.dproj
Normal file
@ -0,0 +1,643 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{9C741757-ECD2-449E-9A8D-8671534F79A7}</ProjectGuid>
|
||||
<MainSource>FaceRecognizer.dpr</MainSource>
|
||||
<Base>True</Base>
|
||||
<Config Condition="'$(Config)'==''">Debug</Config>
|
||||
<TargetedPlatforms>3</TargetedPlatforms>
|
||||
<AppType>Console</AppType>
|
||||
<FrameworkType>VCL</FrameworkType>
|
||||
<ProjectVersion>18.1</ProjectVersion>
|
||||
<Platform Condition="'$(Platform)'==''">Win32</Platform>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Android' and '$(Base)'=='true') or '$(Base_Android)'!=''">
|
||||
<Base_Android>true</Base_Android>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='iOSDevice32' and '$(Base)'=='true') or '$(Base_iOSDevice32)'!=''">
|
||||
<Base_iOSDevice32>true</Base_iOSDevice32>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='iOSDevice64' and '$(Base)'=='true') or '$(Base_iOSDevice64)'!=''">
|
||||
<Base_iOSDevice64>true</Base_iOSDevice64>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='iOSSimulator' and '$(Base)'=='true') or '$(Base_iOSSimulator)'!=''">
|
||||
<Base_iOSSimulator>true</Base_iOSSimulator>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<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)'=='Release' 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="('$(Platform)'=='Win64' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win64)'!=''">
|
||||
<Cfg_1_Win64>true</Cfg_1_Win64>
|
||||
<CfgParent>Cfg_1</CfgParent>
|
||||
<Cfg_1>true</Cfg_1>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''">
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='iOSDevice32' and '$(Cfg_2)'=='true') or '$(Cfg_2_iOSDevice32)'!=''">
|
||||
<Cfg_2_iOSDevice32>true</Cfg_2_iOSDevice32>
|
||||
<CfgParent>Cfg_2</CfgParent>
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='iOSDevice64' and '$(Cfg_2)'=='true') or '$(Cfg_2_iOSDevice64)'!=''">
|
||||
<Cfg_2_iOSDevice64>true</Cfg_2_iOSDevice64>
|
||||
<CfgParent>Cfg_2</CfgParent>
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='iOSSimulator' and '$(Cfg_2)'=='true') or '$(Cfg_2_iOSSimulator)'!=''">
|
||||
<Cfg_2_iOSSimulator>true</Cfg_2_iOSSimulator>
|
||||
<CfgParent>Cfg_2</CfgParent>
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<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="('$(Platform)'=='Win64' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64)'!=''">
|
||||
<Cfg_2_Win64>true</Cfg_2_Win64>
|
||||
<CfgParent>Cfg_2</CfgParent>
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base)'!=''">
|
||||
<Icns_MainIcns>$(BDS)\bin\delphi_PROJECTICNS.icns</Icns_MainIcns>
|
||||
<Icon_MainIcon>$(BDS)\bin\delphi_PROJECTICON.ico</Icon_MainIcon>
|
||||
<Manifest_File>None</Manifest_File>
|
||||
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;Winapi;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace)</DCC_Namespace>
|
||||
<DCC_S>false</DCC_S>
|
||||
<DCC_ImageBase>00400000</DCC_ImageBase>
|
||||
<DCC_K>false</DCC_K>
|
||||
<VerInfo_Locale>1049</VerInfo_Locale>
|
||||
<DCC_N>false</DCC_N>
|
||||
<SanitizedProjectName>FaceRecognizer</SanitizedProjectName>
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=</VerInfo_Keys>
|
||||
<DCC_E>false</DCC_E>
|
||||
<DCC_F>false</DCC_F>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Android)'!=''">
|
||||
<AUP_CAMERA>true</AUP_CAMERA>
|
||||
<AUP_ACCESS_COARSE_LOCATION>true</AUP_ACCESS_COARSE_LOCATION>
|
||||
<Android_LauncherIcon36>$(BDS)\bin\Artwork\Android\FM_LauncherIcon_36x36.png</Android_LauncherIcon36>
|
||||
<Android_LauncherIcon144>$(BDS)\bin\Artwork\Android\FM_LauncherIcon_144x144.png</Android_LauncherIcon144>
|
||||
<AUP_WRITE_EXTERNAL_STORAGE>true</AUP_WRITE_EXTERNAL_STORAGE>
|
||||
<Android_LauncherIcon48>$(BDS)\bin\Artwork\Android\FM_LauncherIcon_48x48.png</Android_LauncherIcon48>
|
||||
<EnabledSysJars>android-support-v4.dex.jar;apk-expansion.dex.jar;cloud-messaging.dex.jar;fmx.dex.jar;google-analytics-v2.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar;google-play-services.dex.jar</EnabledSysJars>
|
||||
<Android_SplashImage470>$(BDS)\bin\Artwork\Android\FM_SplashImage_470x320.png</Android_SplashImage470>
|
||||
<AUP_READ_CALENDAR>true</AUP_READ_CALENDAR>
|
||||
<Android_LauncherIcon96>$(BDS)\bin\Artwork\Android\FM_LauncherIcon_96x96.png</Android_LauncherIcon96>
|
||||
<AUP_CALL_PHONE>true</AUP_CALL_PHONE>
|
||||
<Android_SplashImage960>$(BDS)\bin\Artwork\Android\FM_SplashImage_960x720.png</Android_SplashImage960>
|
||||
<AUP_INTERNET>true</AUP_INTERNET>
|
||||
<AUP_WRITE_CALENDAR>true</AUP_WRITE_CALENDAR>
|
||||
<AUP_ACCESS_FINE_LOCATION>true</AUP_ACCESS_FINE_LOCATION>
|
||||
<Android_LauncherIcon72>$(BDS)\bin\Artwork\Android\FM_LauncherIcon_72x72.png</Android_LauncherIcon72>
|
||||
<Android_SplashImage426>$(BDS)\bin\Artwork\Android\FM_SplashImage_426x320.png</Android_SplashImage426>
|
||||
<AUP_READ_EXTERNAL_STORAGE>true</AUP_READ_EXTERNAL_STORAGE>
|
||||
<BT_BuildType>Debug</BT_BuildType>
|
||||
<VerInfo_Keys>package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=</VerInfo_Keys>
|
||||
<AUP_READ_PHONE_STATE>true</AUP_READ_PHONE_STATE>
|
||||
<Android_SplashImage640>$(BDS)\bin\Artwork\Android\FM_SplashImage_640x480.png</Android_SplashImage640>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_iOSDevice32)'!=''">
|
||||
<iPhone_Spotlight40>$(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_40x40.png</iPhone_Spotlight40>
|
||||
<VerInfo_UIDeviceFamily>iPhoneAndiPad</VerInfo_UIDeviceFamily>
|
||||
<iPad_Launch1024x768>$(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x768.png</iPad_Launch1024x768>
|
||||
<iPad_AppIcon152>$(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png</iPad_AppIcon152>
|
||||
<iPad_SpotLight40>$(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_40x40.png</iPad_SpotLight40>
|
||||
<iPad_Launch768x1024>$(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1024.png</iPad_Launch768x1024>
|
||||
<iPad_Launch1536x2048>$(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2048.png</iPad_Launch1536x2048>
|
||||
<iPad_SpotLight80>$(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png</iPad_SpotLight80>
|
||||
<iPad_Launch2048x1536>$(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1536.png</iPad_Launch2048x1536>
|
||||
<iPhone_Spotlight80>$(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png</iPhone_Spotlight80>
|
||||
<VerInfo_BundleId>$(MSBuildProjectName)</VerInfo_BundleId>
|
||||
<iPad_AppIcon76>$(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_76x76.png</iPad_AppIcon76>
|
||||
<iPhone_AppIcon120>$(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png</iPhone_AppIcon120>
|
||||
<iPhone_AppIcon60>$(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_60x60.png</iPhone_AppIcon60>
|
||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||
<VerInfo_Keys>CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;CFBundleResourceSpecification=ResourceRules.plist;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;FMLocalNotificationPermission=false;UIBackgroundModes=</VerInfo_Keys>
|
||||
<BT_BuildType>Debug</BT_BuildType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_iOSDevice64)'!=''">
|
||||
<iPhone_Spotlight40>$(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_40x40.png</iPhone_Spotlight40>
|
||||
<VerInfo_UIDeviceFamily>iPhoneAndiPad</VerInfo_UIDeviceFamily>
|
||||
<iPad_Launch1024x768>$(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x768.png</iPad_Launch1024x768>
|
||||
<iPad_AppIcon152>$(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png</iPad_AppIcon152>
|
||||
<iPad_SpotLight40>$(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_40x40.png</iPad_SpotLight40>
|
||||
<iPad_Launch768x1024>$(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1024.png</iPad_Launch768x1024>
|
||||
<iPad_Launch1536x2048>$(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2048.png</iPad_Launch1536x2048>
|
||||
<iPad_SpotLight80>$(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png</iPad_SpotLight80>
|
||||
<iPad_Launch2048x1536>$(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1536.png</iPad_Launch2048x1536>
|
||||
<iPhone_Spotlight80>$(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png</iPhone_Spotlight80>
|
||||
<VerInfo_BundleId>$(MSBuildProjectName)</VerInfo_BundleId>
|
||||
<iPad_AppIcon76>$(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_76x76.png</iPad_AppIcon76>
|
||||
<iPhone_AppIcon120>$(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png</iPhone_AppIcon120>
|
||||
<iPhone_AppIcon60>$(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_60x60.png</iPhone_AppIcon60>
|
||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||
<VerInfo_Keys>CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;CFBundleResourceSpecification=ResourceRules.plist;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;FMLocalNotificationPermission=false;UIBackgroundModes=</VerInfo_Keys>
|
||||
<BT_BuildType>Debug</BT_BuildType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_iOSSimulator)'!=''">
|
||||
<VerInfo_UIDeviceFamily>iPhoneAndiPad</VerInfo_UIDeviceFamily>
|
||||
<iPhone_Spotlight40>$(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_40x40.png</iPhone_Spotlight40>
|
||||
<iPad_AppIcon152>$(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png</iPad_AppIcon152>
|
||||
<iPad_Launch1536x2048>$(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2048.png</iPad_Launch1536x2048>
|
||||
<iPad_Launch768x1024>$(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1024.png</iPad_Launch768x1024>
|
||||
<iPad_SpotLight40>$(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_40x40.png</iPad_SpotLight40>
|
||||
<iPad_SpotLight80>$(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png</iPad_SpotLight80>
|
||||
<iPad_Launch1024x768>$(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x768.png</iPad_Launch1024x768>
|
||||
<iPhone_Spotlight80>$(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png</iPhone_Spotlight80>
|
||||
<iPhone_AppIcon120>$(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png</iPhone_AppIcon120>
|
||||
<iPad_AppIcon76>$(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_76x76.png</iPad_AppIcon76>
|
||||
<VerInfo_Keys>CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;CFBundleResourceSpecification=ResourceRules.plist;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;FMLocalNotificationPermission=false;UIBackgroundModes=</VerInfo_Keys>
|
||||
<iPad_Launch2048x1536>$(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1536.png</iPad_Launch2048x1536>
|
||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||
<iPhone_AppIcon60>$(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_60x60.png</iPhone_AppIcon60>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win32)'!=''">
|
||||
<DCC_ExeOutput>..\..\..\bin\win32\</DCC_ExeOutput>
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<DCC_Namespace>System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(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>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win64)'!=''">
|
||||
<DCC_ExeOutput>..\..\..\bin\win64\</DCC_ExeOutput>
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<DCC_Namespace>System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(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>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1)'!=''">
|
||||
<DCC_DebugInformation>0</DCC_DebugInformation>
|
||||
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
|
||||
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
|
||||
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<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="'$(Cfg_1_Win64)'!=''">
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<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="'$(Cfg_2)'!=''">
|
||||
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
|
||||
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
|
||||
<DCC_Optimize>false</DCC_Optimize>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2_iOSDevice32)'!=''">
|
||||
<DCC_RemoteDebug>true</DCC_RemoteDebug>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2_iOSDevice64)'!=''">
|
||||
<DCC_RemoteDebug>true</DCC_RemoteDebug>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2_iOSSimulator)'!=''">
|
||||
<DCC_RemoteDebug>true</DCC_RemoteDebug>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<DelphiCompile Include="$(MainSource)">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="..\..\..\source\ocv.core.types_c.pas"/>
|
||||
<DCCReference Include="..\..\..\source\ocv.highgui_c.pas"/>
|
||||
<DCCReference Include="..\..\..\source\ocv.imgproc.types_c.pas"/>
|
||||
<DCCReference Include="..\..\..\source\ocv.imgproc_c.pas"/>
|
||||
<DCCReference Include="..\..\..\source\ocv.lib.pas"/>
|
||||
<DCCReference Include="..\..\..\source\utils\uResourcePaths.pas"/>
|
||||
<DCCReference Include="..\..\..\source\Classes\ocv.cls.contrib.pas"/>
|
||||
<DCCReference Include="..\..\..\source\Classes\ocv.cls.types.pas"/>
|
||||
<None Include="..\..\..\source\OpenCV.inc"/>
|
||||
<BuildConfiguration Include="Debug">
|
||||
<Key>Cfg_2</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Base">
|
||||
<Key>Base</Key>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Release">
|
||||
<Key>Cfg_1</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
</ItemGroup>
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
|
||||
<Borland.ProjectType/>
|
||||
<BorlandProject>
|
||||
<Delphi.Personality>
|
||||
<Source>
|
||||
<Source Name="MainSource">FaceRecognizer.dpr</Source>
|
||||
</Source>
|
||||
<Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k240.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDSBIN)\dclofficexp240.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||
</Excluded_Packages>
|
||||
</Delphi.Personality>
|
||||
<Platforms>
|
||||
<Platform value="Android">False</Platform>
|
||||
<Platform value="iOSDevice32">False</Platform>
|
||||
<Platform value="iOSDevice64">False</Platform>
|
||||
<Platform value="iOSSimulator">False</Platform>
|
||||
<Platform value="OSX32">False</Platform>
|
||||
<Platform value="Win32">True</Platform>
|
||||
<Platform value="Win64">True</Platform>
|
||||
</Platforms>
|
||||
<Deployment Version="3">
|
||||
<DeployFile LocalName="..\..\..\source\OpenCV.inc" Configuration="Debug" Class="ProjectFile">
|
||||
<Platform Name="Win32">
|
||||
<RemoteDir>.\</RemoteDir>
|
||||
<Overwrite>true</Overwrite>
|
||||
</Platform>
|
||||
</DeployFile>
|
||||
<DeployFile LocalName="..\bin\win32\FaceRecognizer.exe" Configuration="Debug" Class="ProjectOutput">
|
||||
<Platform Name="Win32">
|
||||
<RemoteName>FaceRecognizer.exe</RemoteName>
|
||||
<Overwrite>true</Overwrite>
|
||||
</Platform>
|
||||
</DeployFile>
|
||||
<DeployFile LocalName="\FaceRecognizer.exe" Configuration="Debug" Class="ProjectOutput">
|
||||
<Platform Name="Win64">
|
||||
<RemoteName>FaceRecognizer.exe</RemoteName>
|
||||
<Overwrite>true</Overwrite>
|
||||
</Platform>
|
||||
</DeployFile>
|
||||
<DeployClass Name="DependencyModule">
|
||||
<Platform Name="Win32">
|
||||
<Operation>0</Operation>
|
||||
<Extensions>.dll;.bpl</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="OSX32">
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.dylib</Extensions>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectOSXResource">
|
||||
<Platform Name="OSX32">
|
||||
<RemoteDir>Contents\Resources</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidClassesDexFile">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>classes</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_LauncherIcon144">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AdditionalDebugSymbols">
|
||||
<Platform Name="Win32">
|
||||
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="OSX32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidLibnativeMipsFile">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>library\lib\mips</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPad_Launch768">
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Required="true" Name="ProjectOutput">
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Win32">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Linux64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="OSX32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="DependencyFramework">
|
||||
<Platform Name="Win32">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="OSX32">
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.framework</Extensions>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPhone_Launch640">
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidLibnativeX86File"/>
|
||||
<DeployClass Name="ProjectiOSDeviceDebug">
|
||||
<Platform Name="iOSDevice64">
|
||||
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice32">
|
||||
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPad_Launch1024">
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPhone_Launch320">
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectiOSInfoPList"/>
|
||||
<DeployClass Name="AndroidLibnativeArmeabiFile">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>library\lib\armeabi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="DebugSymbols">
|
||||
<Platform Name="Win32">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="OSX32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPad_Launch1536">
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_SplashImage470">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-normal</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_LauncherIcon96">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-xhdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_SplashImage640">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-large</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPhone_Launch640x1136">
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectiOSEntitlements"/>
|
||||
<DeployClass Name="AndroidGDBServer">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_LauncherIcon72">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-hdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectOSXInfoPList"/>
|
||||
<DeployClass Name="ProjectOSXEntitlements"/>
|
||||
<DeployClass Name="iPad_Launch2048">
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidSplashStyles">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\values</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_SplashImage426">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-small</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidSplashImageDef">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectiOSResource">
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectAndroidManifest">
|
||||
<Platform Name="Android">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_DefaultAppIcon">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="File">
|
||||
<Platform Name="Win32">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="OSX32">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidServiceOutput">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Required="true" Name="DependencyPackage">
|
||||
<Platform Name="Win32">
|
||||
<Operation>0</Operation>
|
||||
<Extensions>.bpl</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.dylib</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="OSX32">
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.dylib</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.dylib</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.dylib</Extensions>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_LauncherIcon48">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-mdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_SplashImage960">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-xlarge</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_LauncherIcon36">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-ldpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectiOSDeviceResourceRules"/>
|
||||
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
|
||||
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
|
||||
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
|
||||
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
|
||||
<ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
|
||||
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME)"/>
|
||||
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
|
||||
<ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
|
||||
</Deployment>
|
||||
</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')"/>
|
||||
<Import Project="$(MSBuildProjectName).deployproj" Condition="Exists('$(MSBuildProjectName).deployproj')"/>
|
||||
</Project>
|
BIN
samples/сlasses/FaceRecognizer/FaceRecognizer.res
Normal file
BIN
samples/сlasses/FaceRecognizer/FaceRecognizer.res
Normal file
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
(*
|
||||
*****************************************************************
|
||||
Delphi-OpenCV Demo
|
||||
Delphi-OpenCV
|
||||
Copyright (C) 2013 Project Delphi-OpenCV
|
||||
****************************************************************
|
||||
Contributor:
|
||||
@ -32,23 +32,11 @@ interface
|
||||
Uses
|
||||
Winapi.Windows,
|
||||
System.Generics.Collections,
|
||||
ocv.cls.types,
|
||||
ocv.core.types_c,
|
||||
ocv.highgui_c;
|
||||
|
||||
Type
|
||||
cbool = bytebool;
|
||||
TOpenCVClass = Pointer;
|
||||
|
||||
IOCVCommon = interface
|
||||
function _InternalData: TOpenCVClass;
|
||||
end;
|
||||
|
||||
TOCVCommon = class(TInterfacedObject, IOCVCommon)
|
||||
private
|
||||
FData: TOpenCVClass;
|
||||
public
|
||||
function _InternalData: TOpenCVClass;
|
||||
end;
|
||||
|
||||
IMat = interface(IOCVCommon)
|
||||
['{2CFB1B8E-4D18-4C1D-839F-0AFE4213F57D}']
|
||||
@ -466,7 +454,7 @@ Type
|
||||
function isOldFormatCascade(): cbool;
|
||||
function getOriginalWindowSize(): ISize;
|
||||
function getFeatureType(): integer;
|
||||
function convert(const oldcascade: String; const newcascade: String): cbool;
|
||||
// function convert(const oldcascade: String; const newcascade: String): cbool;
|
||||
end;
|
||||
|
||||
TCascadeClassifier = class(TOCVCommon, ICascadeClassifier)
|
||||
@ -550,7 +538,7 @@ Type
|
||||
function isOldFormatCascade(): cbool;
|
||||
function getOriginalWindowSize(): ISize;
|
||||
function getFeatureType(): integer;
|
||||
function convert(const oldcascade: String; const newcascade: String): cbool;
|
||||
// function convert(const oldcascade: String; const newcascade: String): cbool;
|
||||
end;
|
||||
|
||||
Type
|
||||
@ -558,10 +546,7 @@ Type
|
||||
function InitFromMat(const Mat: IMat): TIplImage;
|
||||
end;
|
||||
|
||||
TStringAnsiHelper = record helper for
|
||||
String
|
||||
function AsPAnsiChar: PAnsiChar;
|
||||
end;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
@ -609,8 +594,8 @@ function _CascadeClassifier_getOriginalWindowSize(CascadeClassifier: TOpenCVClas
|
||||
external opencv_classes_lib name '_CascadeClassifier_getOriginalWindowSize@4';
|
||||
function _CascadeClassifier_getFeatureType(CascadeClassifier: TOpenCVClass): integer; stdcall;
|
||||
external opencv_classes_lib name '_CascadeClassifier_getFeatureType@4';
|
||||
function _CascadeClassifier_convert(CascadeClassifier: TOpenCVClass; oldcascade, newcascade: PAnsiChar): cbool; stdcall;
|
||||
external opencv_classes_lib name '_CascadeClassifier_convert@12';
|
||||
//function _CascadeClassifier_convert(CascadeClassifier: TOpenCVClass; oldcascade, newcascade: PAnsiChar): cbool; stdcall;
|
||||
// external opencv_classes_lib name '_CascadeClassifier_convert@12';
|
||||
|
||||
procedure namedWindow(const winname: String; const flags: integer = WINDOW_AUTOSIZE);
|
||||
begin
|
||||
@ -842,19 +827,13 @@ begin
|
||||
cvSetData(@Self, Mat.data, Mat.step1);
|
||||
end;
|
||||
|
||||
{ ------------------------------ TStringAnsiHelper ------------------------------ }
|
||||
|
||||
function TStringAnsiHelper.AsPAnsiChar: PAnsiChar;
|
||||
begin
|
||||
Result := c_str(Self);
|
||||
end;
|
||||
|
||||
{ ------------------------------ TCascadeClassifier ------------------------------ }
|
||||
|
||||
function TCascadeClassifier.convert(const oldcascade, newcascade: String): cbool;
|
||||
begin
|
||||
Result := _CascadeClassifier_convert(FData, oldcascade.AsPAnsiChar, newcascade.AsPAnsiChar);
|
||||
end;
|
||||
//function TCascadeClassifier.convert(const oldcascade, newcascade: String): cbool;
|
||||
//begin
|
||||
// Result := _CascadeClassifier_convert(FData, oldcascade.AsPAnsiChar, newcascade.AsPAnsiChar);
|
||||
//end;
|
||||
|
||||
constructor TCascadeClassifier.Create;
|
||||
begin
|
||||
@ -918,13 +897,6 @@ begin
|
||||
Result := _get_CascadeClassifier_load(FData, FileName.AsPAnsiChar);
|
||||
end;
|
||||
|
||||
{ TOCVCommon }
|
||||
|
||||
function TOCVCommon._InternalData: TOpenCVClass;
|
||||
begin
|
||||
Result := FData;
|
||||
end;
|
||||
|
||||
{ TSize }
|
||||
|
||||
constructor TSize.Create(const OpenCVClass: TOpenCVClass);
|
228
source/classes/ocv.cls.contrib.pas
Normal file
228
source/classes/ocv.cls.contrib.pas
Normal file
@ -0,0 +1,228 @@
|
||||
(*
|
||||
*****************************************************************
|
||||
Delphi-OpenCV
|
||||
Copyright (C) 2013 Project Delphi-OpenCV
|
||||
****************************************************************
|
||||
Contributor:
|
||||
Laentir Valetov
|
||||
email:laex@bk.ru
|
||||
****************************************************************
|
||||
You may retrieve the latest version of this file at the GitHub,
|
||||
located at git://github.com/Laex/Delphi-OpenCV.git
|
||||
****************************************************************
|
||||
The contents of this file are used with permission, subject to
|
||||
the Mozilla Public License Version 1.1 (the "License"); you may
|
||||
not use this file except in compliance with the License. You may
|
||||
obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/MPL-1_1Final.html
|
||||
|
||||
Software distributed under the License is distributed on an
|
||||
"AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
*******************************************************************
|
||||
*)
|
||||
|
||||
unit ocv.cls.contrib;
|
||||
|
||||
{$I OpenCV.inc}
|
||||
|
||||
interface
|
||||
|
||||
Uses
|
||||
ocv.core.types_c,
|
||||
ocv.cls.types;
|
||||
|
||||
Type
|
||||
TInputArrayOfArrays = array of pIplImage; // InputArrayOfArrays
|
||||
TInputArray = array of Integer; // InputArray
|
||||
|
||||
IFaceRecognizer = interface(IOCVCommon)
|
||||
['{199DE478-2C78-4347-B553-C062290C78D2}']
|
||||
// Trains a FaceRecognizer.
|
||||
// CV_WRAP virtual void train(InputArrayOfArrays src, InputArray labels) = 0;
|
||||
procedure train(src: TInputArrayOfArrays; labels: TInputArray);
|
||||
|
||||
// Updates a FaceRecognizer.
|
||||
// CV_WRAP void update(InputArrayOfArrays src, InputArray labels);
|
||||
procedure update(src: TInputArrayOfArrays; labels: TInputArray);
|
||||
|
||||
// Gets a prediction from a FaceRecognizer.
|
||||
// virtual int predict(InputArray src) const = 0;
|
||||
function predict(src: pIplImage): Integer; overload;
|
||||
|
||||
// Predicts the label and confidence for a given sample.
|
||||
// CV_WRAP virtual void predict(InputArray src, CV_OUT int &label, CV_OUT double &confidence) const = 0;
|
||||
procedure predict(src: pIplImage; Var lab: Integer; var confidence: double); overload;
|
||||
|
||||
// Serializes this object to a given filename.
|
||||
// CV_WRAP virtual void save(const string& filename) const;
|
||||
procedure save(const filename: string);
|
||||
|
||||
// Deserializes this object from a given filename.
|
||||
// CV_WRAP virtual void load(const string& filename);
|
||||
procedure load(const filename: string);
|
||||
|
||||
// Serializes this object to a given cv::FileStorage.
|
||||
// virtual void save(FileStorage& fs) const = 0;
|
||||
|
||||
// Deserializes this object from a given cv::FileStorage.
|
||||
// virtual void load(const FileStorage& fs) = 0;
|
||||
|
||||
// Sets additional information as pairs label - info.
|
||||
// void setLabelsInfo(const std::map<int, string>& labelsInfo);
|
||||
|
||||
// Gets string information by label
|
||||
// string getLabelInfo(const int &label);
|
||||
|
||||
// Gets labels by string
|
||||
// vector<int> getLabelsByString(const string& str);
|
||||
end;
|
||||
|
||||
TFaceRecognizer = class(TOCVCommon, IFaceRecognizer)
|
||||
public
|
||||
// CV_EXPORTS_W Ptr<FaceRecognizer> createEigenFaceRecognizer(int num_components = 0, double threshold = DBL_MAX);
|
||||
constructor createEigenFaceRecognizer(num_components: Integer = 0; threshold: double = DBL_MAX);
|
||||
// CV_EXPORTS_W Ptr<FaceRecognizer> createFisherFaceRecognizer(int num_components = 0, double threshold = DBL_MAX);
|
||||
constructor createFisherFaceRecognizer(num_components: Integer = 0; threshold: double = DBL_MAX);
|
||||
// CV_EXPORTS_W Ptr<FaceRecognizer> createLBPHFaceRecognizer(int radius=1, int neighbors=8,int grid_x=8, int grid_y=8, double threshold = DBL_MAX);
|
||||
constructor createLBPHFaceRecognizer(radius: Integer = 1; neighbors: Integer = 8; grid_x: Integer = 8;
|
||||
grid_y: Integer = 8; threshold: double = DBL_MAX);
|
||||
destructor Destroy; override;
|
||||
procedure train(src: TInputArrayOfArrays; labels: TInputArray);
|
||||
procedure update(src: TInputArrayOfArrays; labels: TInputArray);
|
||||
function predict(src: pIplImage): Integer; overload;
|
||||
procedure predict(src: pIplImage; Var lab: Integer; var confidence: double); overload;
|
||||
procedure save(const filename: string);
|
||||
procedure load(const filename: string);
|
||||
end;
|
||||
|
||||
(*
|
||||
CV_EXPORTS bool initModule_contrib();
|
||||
*)
|
||||
{$IFDEF SAFELOADLIB}
|
||||
|
||||
type
|
||||
TInitModule_contrib = function()cbool; cdecl;
|
||||
|
||||
var
|
||||
InitModule_contrib: TInitModule_contrib;
|
||||
{$ELSE}
|
||||
function InitModule_contrib(): cbool; cdecl;
|
||||
{$ENDIF}
|
||||
|
||||
implementation
|
||||
|
||||
uses ocv.lib;
|
||||
|
||||
{$IFDEF SAFELOADLIB}
|
||||
|
||||
Var
|
||||
contribDLL: Cardinal;
|
||||
|
||||
procedure Init_opencv_contrib;
|
||||
begin
|
||||
contribDLL := ocvLoadLibrary(opencv_contrib_lib);
|
||||
Assert(contribDLL <> 0, 'Can not init ' + opencv_contrib_lib);
|
||||
|
||||
InitModule_contrib := ocvGetProcAddress('?initModule_contrib@cv@@YA_NXZ', contribDLL);
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
||||
Init_opencv_contrib;
|
||||
|
||||
{$ELSE}
|
||||
function InitModule_contrib; external opencv_contrib_lib name '?initModule_contrib@cv@@YA_NXZ';
|
||||
{$ENDIF}
|
||||
{ TFaceRecognizer }
|
||||
|
||||
// CV_EXPORTS_W Ptr<FaceRecognizer> createEigenFaceRecognizer(int num_components = 0, double threshold = DBL_MAX);
|
||||
function Create_EigenFaceRecognizer(num_components: Integer = 0; threshold: double = DBL_MAX): TOpenCVClass; stdcall;
|
||||
external opencv_classes_lib name '_Create_EigenFaceRecognizer@12';
|
||||
// CV_EXPORTS_W Ptr<FaceRecognizer> createFisherFaceRecognizer(int num_components = 0, double threshold = DBL_MAX);
|
||||
function Create_FisherFaceRecognizer(num_components: Integer = 0; threshold: double = DBL_MAX): TOpenCVClass; stdcall;
|
||||
external opencv_classes_lib name '_Create_FisherFaceRecognizer@12';
|
||||
// CV_EXPORTS_W Ptr<FaceRecognizer> createLBPHFaceRecognizer(int radius=1, int neighbors=8,int grid_x=8, int grid_y=8, double threshold = DBL_MAX);
|
||||
function Create_LBPHFaceRecognizer(radius: Integer = 1; neighbors: Integer = 8; grid_x: Integer = 8;
|
||||
grid_y: Integer = 8; threshold: double = DBL_MAX): TOpenCVClass; stdcall;
|
||||
external opencv_classes_lib name '_Create_LBPHFaceRecognizer@24';
|
||||
|
||||
procedure DestroyFaceRecognizer(const M: TOpenCVClass); stdcall;
|
||||
external opencv_classes_lib name '_DestroyFaceRecognizer@4';
|
||||
procedure FaceRecognizerLoad(const M: TOpenCVClass; filename: PAnsiChar); stdcall;
|
||||
external opencv_classes_lib name '_FaceRecognizerLoad@8';
|
||||
procedure FaceRecognizerSave(const M: TOpenCVClass; filename: PAnsiChar); stdcall;
|
||||
external opencv_classes_lib name '_FaceRecognizerSave@8';
|
||||
|
||||
function FaceRecognizerPredict(const M: TOpenCVClass; scr: pIplImage): Integer; stdcall;
|
||||
external opencv_classes_lib name '_FaceRecognizerPredict1@8'; overload;
|
||||
procedure FaceRecognizerPredict(const M: TOpenCVClass; scr: pIplImage; var _label: Integer; var confidence: double);
|
||||
stdcall; external opencv_classes_lib name '_FaceRecognizerPredict2@16'; overload;
|
||||
|
||||
procedure FaceRecognizerTrain(const M: TOpenCVClass; const n: Integer; scr: Pointer; labels: Pointer); stdcall;
|
||||
external opencv_classes_lib name '_FaceRecognizerTrain@16'; overload;
|
||||
procedure FaceRecognizerUpdate(const M: TOpenCVClass; const n: Integer; scr: Pointer; labels: Pointer); stdcall;
|
||||
external opencv_classes_lib name '_FaceRecognizerUpdate@16';
|
||||
|
||||
procedure _DestroyFaceRecognizer(const E: TOpenCVClass); stdcall;
|
||||
external opencv_classes_lib name '_DestroyFaceRecognizer@4';
|
||||
|
||||
constructor TFaceRecognizer.createEigenFaceRecognizer(num_components: Integer; threshold: double);
|
||||
begin
|
||||
FData := Create_EigenFaceRecognizer(num_components, threshold);
|
||||
end;
|
||||
|
||||
constructor TFaceRecognizer.createFisherFaceRecognizer(num_components: Integer; threshold: double);
|
||||
begin
|
||||
FData := Create_FisherFaceRecognizer(num_components, threshold);
|
||||
end;
|
||||
|
||||
constructor TFaceRecognizer.createLBPHFaceRecognizer(radius, neighbors, grid_x, grid_y: Integer; threshold: double);
|
||||
begin
|
||||
FData := Create_LBPHFaceRecognizer(radius, neighbors, grid_x, grid_y, threshold);
|
||||
end;
|
||||
|
||||
destructor TFaceRecognizer.Destroy;
|
||||
begin
|
||||
if Assigned(FData) then
|
||||
begin
|
||||
_DestroyFaceRecognizer(FData);
|
||||
FData := nil;
|
||||
end;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
procedure TFaceRecognizer.load(const filename: string);
|
||||
begin
|
||||
FaceRecognizerLoad(FData, filename.AsPAnsiChar);
|
||||
end;
|
||||
|
||||
procedure TFaceRecognizer.predict(src: pIplImage; var lab: Integer; var confidence: double);
|
||||
begin
|
||||
FaceRecognizerPredict(FData, src, lab, confidence);
|
||||
end;
|
||||
|
||||
function TFaceRecognizer.predict(src: pIplImage): Integer;
|
||||
var
|
||||
confidence: double;
|
||||
begin
|
||||
FaceRecognizerPredict(FData, src, Result, confidence);
|
||||
end;
|
||||
|
||||
procedure TFaceRecognizer.save(const filename: string);
|
||||
begin
|
||||
FaceRecognizerSave(FData, filename.AsPAnsiChar);
|
||||
end;
|
||||
|
||||
procedure TFaceRecognizer.train(src: TInputArrayOfArrays; labels: TInputArray);
|
||||
begin
|
||||
FaceRecognizerTrain(FData, Length(src), @src[0], @labels[0]);
|
||||
end;
|
||||
|
||||
procedure TFaceRecognizer.update(src: TInputArrayOfArrays; labels: TInputArray);
|
||||
begin
|
||||
FaceRecognizerUpdate(FData, Length(src), @src[0], @labels[0]);
|
||||
end;
|
||||
|
||||
end.
|
69
source/classes/ocv.cls.types.pas
Normal file
69
source/classes/ocv.cls.types.pas
Normal file
@ -0,0 +1,69 @@
|
||||
(*
|
||||
*****************************************************************
|
||||
Delphi-OpenCV
|
||||
Copyright (C) 2013 Project Delphi-OpenCV
|
||||
****************************************************************
|
||||
Contributor:
|
||||
Laentir Valetov
|
||||
email:laex@bk.ru
|
||||
****************************************************************
|
||||
You may retrieve the latest version of this file at the GitHub,
|
||||
located at git://github.com/Laex/Delphi-OpenCV.git
|
||||
****************************************************************
|
||||
The contents of this file are used with permission, subject to
|
||||
the Mozilla Public License Version 1.1 (the "License"); you may
|
||||
not use this file except in compliance with the License. You may
|
||||
obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/MPL-1_1Final.html
|
||||
|
||||
Software distributed under the License is distributed on an
|
||||
"AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
rights and limitations under the License.
|
||||
*******************************************************************
|
||||
*)
|
||||
|
||||
unit ocv.cls.types;
|
||||
|
||||
{$I OpenCV.inc}
|
||||
|
||||
interface
|
||||
|
||||
Type
|
||||
TOpenCVClass = Pointer;
|
||||
|
||||
IOCVCommon = interface
|
||||
function _InternalData: TOpenCVClass;
|
||||
end;
|
||||
|
||||
TOCVCommon = class(TInterfacedObject, IOCVCommon)
|
||||
protected
|
||||
FData: TOpenCVClass;
|
||||
public
|
||||
function _InternalData: TOpenCVClass;
|
||||
end;
|
||||
|
||||
TStringAnsiHelper = record helper for
|
||||
String
|
||||
function AsPAnsiChar: PAnsiChar;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
Uses ocv.utils;
|
||||
|
||||
{ TOCVCommon }
|
||||
|
||||
function TOCVCommon._InternalData: TOpenCVClass;
|
||||
begin
|
||||
Result := FData;
|
||||
end;
|
||||
|
||||
{ TStringAnsiHelper }
|
||||
|
||||
function TStringAnsiHelper.AsPAnsiChar: PAnsiChar;
|
||||
begin
|
||||
Result := c_str(Self);
|
||||
end;
|
||||
|
||||
end.
|
@ -52,41 +52,33 @@ unit ocv.core.types_c;
|
||||
|
||||
interface
|
||||
|
||||
// uses
|
||||
// {$IFDEF IFDEF HAS_UNITSCOPE}
|
||||
// {$IFDEF MSWINDOWS}
|
||||
// WinApi.Windows
|
||||
// {$ENDIF MSWINDOWS}
|
||||
// {$ELSE}
|
||||
// {$IFDEF MSWINDOWS}
|
||||
// Windows
|
||||
// {$ENDIF MSWINDOWS}
|
||||
// {$ENDIF};
|
||||
|
||||
const
|
||||
// Íàèìåíüøåå ÷èñëî äëÿ êîòîðîãî âûïîëíÿåòñÿ óñëîâèå 1.0+DBL_EPSILON <> 1.0
|
||||
DBL_EPSILON = 2.2204460492503131E-016;
|
||||
DBL_MAX = 1.7976931348623157E+308;
|
||||
DBL_MAX = 1.7976931348623157E+308;
|
||||
FLT_EPSILON = 1.19209290E-07;
|
||||
FLT_MAX = 1E+37;
|
||||
FLT_MAX = 1E+37;
|
||||
|
||||
type
|
||||
Float = Single;
|
||||
pFloat = ^Float;
|
||||
ppFloat = ^pFloat;
|
||||
cbool = bytebool;
|
||||
Float = Single;
|
||||
uint = NativeUInt;
|
||||
size_t = NativeUInt;
|
||||
pFloat = ^Float;
|
||||
ppFloat = ^pFloat;
|
||||
pPointer = ^Pointer;
|
||||
ppvoid = pPointer;
|
||||
ppvoid = pPointer;
|
||||
|
||||
TSingleArray1D = array [0 .. 1] of Single;
|
||||
pSingleArray1D = ^TSingleArray1D;
|
||||
TSingleArray2D = array [0 .. 1] of pSingleArray1D;
|
||||
pSingleArray2D = ^TSingleArray2D;
|
||||
|
||||
TCVChar = AnsiChar;
|
||||
pCVChar = pAnsiChar;
|
||||
TCVChar = AnsiChar;
|
||||
pCVChar = pAnsiChar;
|
||||
TpCVCharArray = array [0 .. 0] of pCVChar;
|
||||
ppCVChar = ^TpCVCharArray;
|
||||
CVChar = AnsiChar;
|
||||
ppCVChar = ^TpCVCharArray;
|
||||
CVChar = AnsiChar;
|
||||
// {$IFNDEF WIN64}
|
||||
// size_t = UInt32;
|
||||
// {$ELSE}
|
||||
@ -95,25 +87,22 @@ type
|
||||
{$IFNDEF DELPHIXE2_UP}
|
||||
{$IFDEF CLR}
|
||||
{$IFDEF DELPHI2007}
|
||||
NativeInt = size_t;
|
||||
NativeInt = size_t;
|
||||
NativeUInt = size_t;
|
||||
{$ELSE}
|
||||
NativeInt = Integer;
|
||||
NativeInt = Integer;
|
||||
NativeUInt = Cardinal;
|
||||
{$ENDIF}
|
||||
{$ELSE}
|
||||
{$IFDEF FPC}
|
||||
NativeInt = SizeInt;
|
||||
NativeInt = SizeInt;
|
||||
NativeUInt = SizeUInt;
|
||||
{$ELSE}
|
||||
NativeInt = Integer;
|
||||
NativeInt = Integer;
|
||||
NativeUInt = Cardinal;
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
uint = NativeUInt;
|
||||
size_t = NativeUInt;
|
||||
|
||||
function strdup(const str: pCVChar): pCVChar;
|
||||
function cv_stricmp(const str1, str2: pCVChar): Integer;
|
||||
procedure strcpy(var str1: pCVChar; const str2: pCVChar); overload;
|
||||
@ -147,7 +136,7 @@ type
|
||||
TVoid = record
|
||||
end;
|
||||
|
||||
pCvArr = Pointer;
|
||||
pCvArr = Pointer;
|
||||
TCvArrArray = array [0 .. 0] of pCvArr;
|
||||
pCvArrArray = ^TCvArrArray;
|
||||
|
||||
@ -175,57 +164,57 @@ type
|
||||
{$EXTERNALSYM CVStatus}
|
||||
|
||||
const
|
||||
CV_StsOk = 0; (* everithing is ok *)
|
||||
CV_StsBackTrace = -1; (* pseudo error for back trace *)
|
||||
CV_StsError = -2; (* unknown /unspecified error *)
|
||||
CV_StsInternal = -3; (* internal error (bad state) *)
|
||||
CV_StsNoMem = -4; (* insufficient memory *)
|
||||
CV_StsBadArg = -5; (* function arg/param is bad *)
|
||||
CV_StsBadFunc = -6; (* unsupported function *)
|
||||
CV_StsNoConv = -7; (* iter. didn't converge *)
|
||||
CV_StsAutoTrace = -8; (* tracing *)
|
||||
CV_HeaderIsNull = -9; (* image header is 0 *)
|
||||
CV_BadImageSize = -10; (* image size is invalid *)
|
||||
CV_BadOffset = -11; (* offset is invalid *)
|
||||
CV_BadDataPtr = -12; (* *)
|
||||
CV_BadStep = -13; (* *)
|
||||
CV_BadModelOrChSeq = -14; (* *)
|
||||
CV_BadNumChannels = -15; (* *)
|
||||
CV_BadNumChannel1U = -16; (* *)
|
||||
CV_BadDepth = -17; (* *)
|
||||
CV_BadAlphaChannel = -18; (* *)
|
||||
CV_BadOrder = -19; (* *)
|
||||
CV_BadOrigin = -20; (* *)
|
||||
CV_BadAlign = -21; (* *)
|
||||
CV_BadCallBack = -22; (* *)
|
||||
CV_BadTileSize = -23; (* *)
|
||||
CV_BadCOI = -24; (* *)
|
||||
CV_BadROISize = -25; (* *)
|
||||
CV_MaskIsTiled = -26; (* *)
|
||||
CV_StsNullPtr = -27; (* null pointer *)
|
||||
CV_StsVecLengthErr = -28; (* incorrect vector length *)
|
||||
CV_StsFilterStructContentErr = -29; (* incorr. filter structure content *)
|
||||
CV_StsKernelStructContentErr = -30; (* incorr. transform kernel content *)
|
||||
CV_StsFilterOffsetErr = -31; (* incorrect filter ofset value *)
|
||||
CV_StsBadSize = -201; (* the input/output structure size is incorrect *)
|
||||
CV_StsDivByZero = -202; (* division by zero *)
|
||||
CV_StsInplaceNotSupported = -203; (* in-place operation is not supported *)
|
||||
CV_StsObjectNotFound = -204; (* request can't be completed *)
|
||||
CV_StsUnmatchedFormats = -205; (* formats of input/output arrays differ *)
|
||||
CV_StsBadFlag = -206; (* flag is wrong or not supported *)
|
||||
CV_StsBadPoint = -207; (* bad CvPoint *)
|
||||
CV_StsBadMask = -208; (* bad format of mask (neither 8uC1 nor 8sC1) *)
|
||||
CV_StsUnmatchedSizes = -209; (* sizes of input/output structures do not match *)
|
||||
CV_StsUnsupportedFormat = -210; (* the data format/type is not supported by the function *)
|
||||
CV_StsOutOfRange = -211; (* some of parameters are out of range *)
|
||||
CV_StsParseError = -212; (* invalid syntax/structure of the parsed file *)
|
||||
CV_StsNotImplemented = -213; (* the requested function/feature is not implemented *)
|
||||
CV_StsBadMemBlock = -214; (* an allocated block has been corrupted *)
|
||||
CV_StsAssert = -215; (* assertion failed *)
|
||||
CV_GpuNotSupported = -216;
|
||||
CV_GpuApiCallError = -217;
|
||||
CV_OpenGlNotSupported = -218;
|
||||
CV_OpenGlApiCallError = -219;
|
||||
CV_StsOk = 0; (* everithing is ok *)
|
||||
CV_StsBackTrace = -1; (* pseudo error for back trace *)
|
||||
CV_StsError = -2; (* unknown /unspecified error *)
|
||||
CV_StsInternal = -3; (* internal error (bad state) *)
|
||||
CV_StsNoMem = -4; (* insufficient memory *)
|
||||
CV_StsBadArg = -5; (* function arg/param is bad *)
|
||||
CV_StsBadFunc = -6; (* unsupported function *)
|
||||
CV_StsNoConv = -7; (* iter. didn't converge *)
|
||||
CV_StsAutoTrace = -8; (* tracing *)
|
||||
CV_HeaderIsNull = -9; (* image header is 0 *)
|
||||
CV_BadImageSize = -10; (* image size is invalid *)
|
||||
CV_BadOffset = -11; (* offset is invalid *)
|
||||
CV_BadDataPtr = -12; (* *)
|
||||
CV_BadStep = -13; (* *)
|
||||
CV_BadModelOrChSeq = -14; (* *)
|
||||
CV_BadNumChannels = -15; (* *)
|
||||
CV_BadNumChannel1U = -16; (* *)
|
||||
CV_BadDepth = -17; (* *)
|
||||
CV_BadAlphaChannel = -18; (* *)
|
||||
CV_BadOrder = -19; (* *)
|
||||
CV_BadOrigin = -20; (* *)
|
||||
CV_BadAlign = -21; (* *)
|
||||
CV_BadCallBack = -22; (* *)
|
||||
CV_BadTileSize = -23; (* *)
|
||||
CV_BadCOI = -24; (* *)
|
||||
CV_BadROISize = -25; (* *)
|
||||
CV_MaskIsTiled = -26; (* *)
|
||||
CV_StsNullPtr = -27; (* null pointer *)
|
||||
CV_StsVecLengthErr = -28; (* incorrect vector length *)
|
||||
CV_StsFilterStructContentErr = -29; (* incorr. filter structure content *)
|
||||
CV_StsKernelStructContentErr = -30; (* incorr. transform kernel content *)
|
||||
CV_StsFilterOffsetErr = -31; (* incorrect filter ofset value *)
|
||||
CV_StsBadSize = -201; (* the input/output structure size is incorrect *)
|
||||
CV_StsDivByZero = -202; (* division by zero *)
|
||||
CV_StsInplaceNotSupported = -203; (* in-place operation is not supported *)
|
||||
CV_StsObjectNotFound = -204; (* request can't be completed *)
|
||||
CV_StsUnmatchedFormats = -205; (* formats of input/output arrays differ *)
|
||||
CV_StsBadFlag = -206; (* flag is wrong or not supported *)
|
||||
CV_StsBadPoint = -207; (* bad CvPoint *)
|
||||
CV_StsBadMask = -208; (* bad format of mask (neither 8uC1 nor 8sC1) *)
|
||||
CV_StsUnmatchedSizes = -209; (* sizes of input/output structures do not match *)
|
||||
CV_StsUnsupportedFormat = -210; (* the data format/type is not supported by the function *)
|
||||
CV_StsOutOfRange = -211; (* some of parameters are out of range *)
|
||||
CV_StsParseError = -212; (* invalid syntax/structure of the parsed file *)
|
||||
CV_StsNotImplemented = -213; (* the requested function/feature is not implemented *)
|
||||
CV_StsBadMemBlock = -214; (* an allocated block has been corrupted *)
|
||||
CV_StsAssert = -215; (* assertion failed *)
|
||||
CV_GpuNotSupported = -216;
|
||||
CV_GpuApiCallError = -217;
|
||||
CV_OpenGlNotSupported = -218;
|
||||
CV_OpenGlApiCallError = -219;
|
||||
|
||||
(* ***************************************************************************************\
|
||||
* Common macros and functions *
|
||||
@ -320,19 +309,19 @@ const
|
||||
{$EXTERNALSYM IPL_BORDER_WRAP}
|
||||
// * Sub-pixel interpolation methods */
|
||||
|
||||
CV_INTER_NN = 0;
|
||||
CV_INTER_LINEAR = 1;
|
||||
CV_INTER_CUBIC = 2;
|
||||
CV_INTER_AREA = 3;
|
||||
CV_INTER_NN = 0;
|
||||
CV_INTER_LINEAR = 1;
|
||||
CV_INTER_CUBIC = 2;
|
||||
CV_INTER_AREA = 3;
|
||||
CV_INTER_LANCZOS4 = 4;
|
||||
|
||||
type
|
||||
|
||||
pIplImage = ^TIplImage;
|
||||
pIplImage = ^TIplImage;
|
||||
TpIplImageArray = array [0 .. 1] of pIplImage;
|
||||
ppIplImage = ^TpIplImageArray;
|
||||
pIplROI = ^TIplROI;
|
||||
pIplTileInfo = ^TIplTileInfo;
|
||||
ppIplImage = ^TpIplImageArray;
|
||||
pIplROI = ^TIplROI;
|
||||
pIplTileInfo = ^TIplTileInfo;
|
||||
|
||||
TIplROI = record
|
||||
coi: Integer; (* 0 - no COI (all channels are selected), 1 - 0th channel is selected ... *)
|
||||
@ -355,29 +344,29 @@ type
|
||||
TA4CVChar = array [0 .. 3] of CVChar;
|
||||
|
||||
TIplImage = record
|
||||
nSize: Integer; (* sizeof(IplImage) *)
|
||||
id: Integer; (* version (=0) *)
|
||||
nChannels: Integer; (* Most of OpenCV functions support 1,2,3 or 4 channels *)
|
||||
nSize: Integer; (* sizeof(IplImage) *)
|
||||
id: Integer; (* version (=0) *)
|
||||
nChannels: Integer; (* Most of OpenCV functions support 1,2,3 or 4 channels *)
|
||||
alphaChannel: Integer; (* Ignored by OpenCV *)
|
||||
depth: Integer; (* Pixel depth in bits: Pixel depth in bits: IPL_DEPTH_8U, IPL_DEPTH_8S, IPL_DEPTH_16S,
|
||||
IPL_DEPTH_32S, IPL_DEPTH_32F and IPL_DEPTH_64F are supported. *)
|
||||
colorModel: TA4CVChar; (* Ignored by OpenCV *)
|
||||
channelSeq: TA4CVChar; (* ditto *)
|
||||
dataOrder: Integer; (* 0 - interleaved color channels, 1 - separate color channels. *)
|
||||
origin: Integer; (* 0 - top-left origin, *)
|
||||
align: Integer; (* Alignment of image rows (4 or 8). *)
|
||||
width: Integer; (* Image width in pixels. *)
|
||||
height: Integer; (* Image height in pixels. *)
|
||||
roi: pIplROI; (* Image ROI. If NULL, the whole image is selected. *)
|
||||
maskROI: pIplImage; (* Must be NULL. *)
|
||||
imageId: Pointer; (* " " *)
|
||||
tileInfo: pIplTileInfo; (* " " *)
|
||||
imageSize: Integer; (* Image data size in bytes *)
|
||||
imageData: PByte; (* Pointer to aligned image data. *)
|
||||
widthStep: Integer; (* Size of aligned image row in bytes. *)
|
||||
BorderMode: array [0 .. 3] of Integer; (* Ignored by ocv. *)
|
||||
colorModel: TA4CVChar; (* Ignored by OpenCV *)
|
||||
channelSeq: TA4CVChar; (* ditto *)
|
||||
dataOrder: Integer; (* 0 - interleaved color channels, 1 - separate color channels. *)
|
||||
origin: Integer; (* 0 - top-left origin, *)
|
||||
align: Integer; (* Alignment of image rows (4 or 8). *)
|
||||
width: Integer; (* Image width in pixels. *)
|
||||
height: Integer; (* Image height in pixels. *)
|
||||
roi: pIplROI; (* Image ROI. If NULL, the whole image is selected. *)
|
||||
maskROI: pIplImage; (* Must be NULL. *)
|
||||
imageId: Pointer; (* " " *)
|
||||
tileInfo: pIplTileInfo; (* " " *)
|
||||
imageSize: Integer; (* Image data size in bytes *)
|
||||
imageData: PByte; (* Pointer to aligned image data. *)
|
||||
widthStep: Integer; (* Size of aligned image row in bytes. *)
|
||||
BorderMode: array [0 .. 3] of Integer; (* Ignored by ocv. *)
|
||||
BorderConst: array [0 .. 3] of Integer; (* Ditto. *)
|
||||
imageDataOrigin: PByte; (* Pointer to very origin of image data *)
|
||||
imageDataOrigin: PByte; (* Pointer to very origin of image data *)
|
||||
end;
|
||||
|
||||
TcvImage = TIplImage;
|
||||
@ -583,15 +572,15 @@ const
|
||||
|
||||
type
|
||||
|
||||
pCvMat = ^TCvMat;
|
||||
pCvMat = ^TCvMat;
|
||||
ppCvMat = ^pCvMat;
|
||||
|
||||
TCvMat = record
|
||||
public
|
||||
_type: Integer;
|
||||
step: Integer;
|
||||
step : Integer;
|
||||
|
||||
refcount: PInteger;
|
||||
refcount : PInteger;
|
||||
hdr_refcount: Integer;
|
||||
|
||||
data: Pointer;
|
||||
@ -701,7 +690,7 @@ type
|
||||
thresh: array [0 .. CV_MAX_DIM - 1, 0 .. 1] of Single;
|
||||
(* For uniform histograms. *)
|
||||
thresh2: PSingle; (* For non-uniform histograms. *)
|
||||
mat: TCvMatND; (* Embedded matrix header for array histograms. *)
|
||||
mat: TCvMatND; (* Embedded matrix header for array histograms. *)
|
||||
end;
|
||||
|
||||
(* ***************************************************************************************\
|
||||
@ -821,17 +810,17 @@ Type
|
||||
|
||||
TCvBox2D = record
|
||||
center: TCvPoint2D32f; (* Center of the box. *)
|
||||
size: TCvSize2D32f; (* Box width and length. *)
|
||||
angle: Single; (* Angle between the horizontal axis *)
|
||||
size: TCvSize2D32f; (* Box width and length. *)
|
||||
angle: Single; (* Angle between the horizontal axis *)
|
||||
end;
|
||||
|
||||
pCvNArrayIterator = ^TCvNArrayIterator;
|
||||
|
||||
TCvNArrayIterator = record
|
||||
count: Integer; // number of arrays
|
||||
dims: Integer; // number of dimensions to iterate
|
||||
size: TCvSize; // maximal common linear size: { width = size, height = 1 }
|
||||
ptr: Array [0 .. CV_MAX_ARR - 1] of ^uchar; // pointers to the array slices
|
||||
count: Integer; // number of arrays
|
||||
dims: Integer; // number of dimensions to iterate
|
||||
size: TCvSize; // maximal common linear size: { width = size, height = 1 }
|
||||
ptr: Array [0 .. CV_MAX_ARR - 1] of ^uchar; // pointers to the array slices
|
||||
stack: Array [0 .. CV_MAX_DIM - 1] of Integer; // for internal use
|
||||
hdr: Array [0 .. CV_MAX_ARR - 1] of ^TCvMatND; // pointers to the headers of the
|
||||
end;
|
||||
@ -897,8 +886,8 @@ type
|
||||
top: pCvMemBlock; (* First allocated block. *)
|
||||
parent: pCvMemStorage;
|
||||
(* Current memory block - top of the stack. *) (* We get new blocks from parent as needed. *)
|
||||
block_size: Integer; (* Block size. *)
|
||||
free_space: Integer; (* Remaining free space in current block. *)
|
||||
block_size: Integer; (* Block size. *)
|
||||
free_space: Integer; (* Remaining free space in current block. *)
|
||||
end;
|
||||
|
||||
type
|
||||
@ -914,42 +903,42 @@ type
|
||||
pCvSeqBlock = ^TCvSeqBlock;
|
||||
|
||||
TCvSeqBlock = record
|
||||
prev: pCvSeqBlock; (* Previous sequence block. *)
|
||||
next: pCvSeqBlock; (* Next sequence block. *)
|
||||
prev: pCvSeqBlock; (* Previous sequence block. *)
|
||||
next: pCvSeqBlock; (* Next sequence block. *)
|
||||
start_index: Integer; (* Index of the first element in the block + *)
|
||||
count: Integer; (* Number of elements in the block. *)
|
||||
data: Pointer; (* Pointer to the first element of the block. *)
|
||||
count: Integer; (* Number of elements in the block. *)
|
||||
data: Pointer; (* Pointer to the first element of the block. *)
|
||||
end;
|
||||
|
||||
TCvSeqBlockArray = array [0 .. 0] of TCvSeqBlock;
|
||||
pCvSeqBlockArray = ^TCvSeqBlockArray;
|
||||
|
||||
TCV_TREE_NODE_FIELDS<node_type> = record
|
||||
flags: Integer; (* Miscellaneous flags. *)
|
||||
flags: Integer; (* Miscellaneous flags. *)
|
||||
header_size: Integer; (* Size of sequence header. *)
|
||||
h_prev: ^node_type; (* Previous sequence. *)
|
||||
h_next: ^node_type; (* Next sequence. *)
|
||||
v_prev: ^node_type; (* 2nd previous sequence. *)
|
||||
v_next: ^node_type; (* 2nd next sequence. *)
|
||||
h_prev: ^node_type; (* Previous sequence. *)
|
||||
h_next: ^node_type; (* Next sequence. *)
|
||||
v_prev: ^node_type; (* 2nd previous sequence. *)
|
||||
v_next: ^node_type; (* 2nd next sequence. *)
|
||||
end;
|
||||
|
||||
pCvSeq = ^TCvSeq;
|
||||
|
||||
TCvSeq = record
|
||||
flags: Integer; (* Miscellaneous flags. *)
|
||||
header_size: Integer; (* Size of sequence header. *)
|
||||
h_prev: pCvSeq; (* Previous sequence. *)
|
||||
h_next: pCvSeq; (* Next sequence. *)
|
||||
v_prev: pCvSeq; (* 2nd previous sequence. *)
|
||||
v_next: pCvSeq; (* 2nd next sequence. *)
|
||||
total: Integer; (* Total number of elements. *)
|
||||
elem_size: Integer; (* Size of sequence element in bytes. *)
|
||||
block_max: Pointer; (* Maximal bound of the last block. *)
|
||||
ptr: pschar; (* Current write pointer. *)
|
||||
delta_elems: Integer; (* Grow seq this many at a time. *)
|
||||
storage: pCvMemStorage; (* Where the seq is stored. *)
|
||||
flags: Integer; (* Miscellaneous flags. *)
|
||||
header_size: Integer; (* Size of sequence header. *)
|
||||
h_prev: pCvSeq; (* Previous sequence. *)
|
||||
h_next: pCvSeq; (* Next sequence. *)
|
||||
v_prev: pCvSeq; (* 2nd previous sequence. *)
|
||||
v_next: pCvSeq; (* 2nd next sequence. *)
|
||||
total: Integer; (* Total number of elements. *)
|
||||
elem_size: Integer; (* Size of sequence element in bytes. *)
|
||||
block_max: Pointer; (* Maximal bound of the last block. *)
|
||||
ptr: pschar; (* Current write pointer. *)
|
||||
delta_elems: Integer; (* Grow seq this many at a time. *)
|
||||
storage: pCvMemStorage; (* Where the seq is stored. *)
|
||||
free_blocks: pCvSeqBlock; (* Free blocks list. *)
|
||||
first: pCvSeqBlock; (* Pointer to the first sequence block. *)
|
||||
first: pCvSeqBlock; (* Pointer to the first sequence block. *)
|
||||
end;
|
||||
|
||||
(*
|
||||
@ -958,18 +947,18 @@ type
|
||||
*)
|
||||
TCV_SEQUENCE_FIELDS = record
|
||||
CV_TREE_NODE_FIELDS: TCV_TREE_NODE_FIELDS<TCvSeq>;
|
||||
total: Integer; (* Total number of elements. *)
|
||||
elem_size: Integer; (* Size of sequence element in bytes. *)
|
||||
block_max: pschar; (* Maximal bound of the last block. *)
|
||||
ptr: pschar; (* Current write pointer. *)
|
||||
delta_elems: Integer; (* Grow seq this many at a time. *)
|
||||
storage: pCvMemStorage; (* Where the seq is stored. *)
|
||||
total: Integer; (* Total number of elements. *)
|
||||
elem_size: Integer; (* Size of sequence element in bytes. *)
|
||||
block_max: pschar; (* Maximal bound of the last block. *)
|
||||
ptr: pschar; (* Current write pointer. *)
|
||||
delta_elems: Integer; (* Grow seq this many at a time. *)
|
||||
storage: pCvMemStorage; (* Where the seq is stored. *)
|
||||
free_blocks: pCvSeqBlock; (* Free blocks list. *)
|
||||
first: pCvSeqBlock; (* Pointer to the first sequence block. *)
|
||||
first: pCvSeqBlock; (* Pointer to the first sequence block. *)
|
||||
end;
|
||||
|
||||
pCvSeqArray = array [0 .. 1] of pCvSeq;
|
||||
ppCvSeq = ^pCvSeqArray;
|
||||
ppCvSeq = ^pCvSeqArray;
|
||||
|
||||
const
|
||||
CV_TYPE_NAME_SEQ = 'opencv-sequence';
|
||||
@ -984,20 +973,20 @@ type
|
||||
pCvContour = ^TCvContour;
|
||||
|
||||
TCvContour = record
|
||||
flags: Integer; // micsellaneous flags
|
||||
header_size: Integer; // size of sequence header
|
||||
h_prev: pCvArr; // previous sequence
|
||||
h_next: pCvArr; // next sequence
|
||||
v_prev: pCvArr; // 2nd previous sequence
|
||||
v_next: pCvArr; // 2nd next sequence
|
||||
total: Integer; // total number of elements
|
||||
elem_size: Integer; // size of sequence element in bytes
|
||||
block_max: pAnsiChar; // maximal bound of the last block
|
||||
ptr: pAnsiChar; // current write pointer
|
||||
delta_elems: Integer; // how many elements allocated when the seq grows
|
||||
storage: pCvMemStorage; // where the seq is stored
|
||||
flags: Integer; // micsellaneous flags
|
||||
header_size: Integer; // size of sequence header
|
||||
h_prev: pCvArr; // previous sequence
|
||||
h_next: pCvArr; // next sequence
|
||||
v_prev: pCvArr; // 2nd previous sequence
|
||||
v_next: pCvArr; // 2nd next sequence
|
||||
total: Integer; // total number of elements
|
||||
elem_size: Integer; // size of sequence element in bytes
|
||||
block_max: pAnsiChar; // maximal bound of the last block
|
||||
ptr: pAnsiChar; // current write pointer
|
||||
delta_elems: Integer; // how many elements allocated when the seq grows
|
||||
storage: pCvMemStorage; // where the seq is stored
|
||||
free_blocks: pCvSeqBlock; // free blocks list
|
||||
first: pCvSeqBlock; // pointer to the first sequence block
|
||||
first: pCvSeqBlock; // pointer to the first sequence block
|
||||
rect: TCvRect;
|
||||
color: Integer;
|
||||
reserved: array [0 .. 2] of Integer;
|
||||
@ -1035,20 +1024,20 @@ type
|
||||
pCvSet = ^TCvSet;
|
||||
|
||||
TCvSet = record
|
||||
flags: Integer; (* Miscellaneous flags. *)
|
||||
header_size: Integer; (* Size of sequence header. *)
|
||||
h_prev: pCvSeq; (* Previous sequence. *)
|
||||
h_next: pCvSeq; (* Next sequence. *)
|
||||
v_prev: pCvSeq; (* 2nd previous sequence. *)
|
||||
v_next: pCvSeq; (* 2nd next sequence. *)
|
||||
total: Integer; (* Total number of elements. *)
|
||||
elem_size: Integer; (* Size of sequence element in bytes. *)
|
||||
block_max: Pointer; (* Maximal bound of the last block. *)
|
||||
ptr: Pointer; (* Current write pointer. *)
|
||||
delta_elems: Integer; (* Grow seq this many at a time. *)
|
||||
storage: pCvMemStorage; (* Where the seq is stored. *)
|
||||
flags: Integer; (* Miscellaneous flags. *)
|
||||
header_size: Integer; (* Size of sequence header. *)
|
||||
h_prev: pCvSeq; (* Previous sequence. *)
|
||||
h_next: pCvSeq; (* Next sequence. *)
|
||||
v_prev: pCvSeq; (* 2nd previous sequence. *)
|
||||
v_next: pCvSeq; (* 2nd next sequence. *)
|
||||
total: Integer; (* Total number of elements. *)
|
||||
elem_size: Integer; (* Size of sequence element in bytes. *)
|
||||
block_max: Pointer; (* Maximal bound of the last block. *)
|
||||
ptr: Pointer; (* Current write pointer. *)
|
||||
delta_elems: Integer; (* Grow seq this many at a time. *)
|
||||
storage: pCvMemStorage; (* Where the seq is stored. *)
|
||||
free_blocks: pCvSeqBlock; (* Free blocks list. *)
|
||||
first: pCvSeqBlock; (* Pointer to the first sequence block. *)
|
||||
first: pCvSeqBlock; (* Pointer to the first sequence block. *)
|
||||
free_elems: pCvSetElem;
|
||||
active_count: Integer;
|
||||
end;
|
||||
@ -1138,7 +1127,7 @@ type
|
||||
Type
|
||||
|
||||
pCvGraphEdge = ^TCvGraphEdge;
|
||||
pCvGraphVtx = ^TCvGraphVtx;
|
||||
pCvGraphVtx = ^TCvGraphVtx;
|
||||
|
||||
TCV_GRAPH_EDGE_FIELDS = record
|
||||
flags: Integer;
|
||||
@ -1415,9 +1404,9 @@ type
|
||||
|
||||
TCvSeqWriter = record
|
||||
header_size: Integer;
|
||||
Seq: pCvSeq; // * the sequence written */
|
||||
Seq: pCvSeq; // * the sequence written */
|
||||
block: pCvSeqBlock; // * current block */
|
||||
ptr: Pointer; // * pointer to free space */
|
||||
ptr: Pointer; // * pointer to free space */
|
||||
block_min: Pointer; // * pointer to the beginning of block*/
|
||||
block_max: Pointer; // * pointer to the end of block */
|
||||
end;
|
||||
@ -1426,13 +1415,13 @@ type
|
||||
|
||||
TCvSeqReader = record
|
||||
header_size: Integer;
|
||||
Seq: pCvSeq; // * sequence, beign read */
|
||||
block: pCvSeqBlock; // * current block */
|
||||
ptr: Pointer; // * pointer to element be read next */
|
||||
block_min: Pointer; // * pointer to the beginning of block */
|
||||
block_max: Pointer; // * pointer to the end of block */
|
||||
Seq: pCvSeq; // * sequence, beign read */
|
||||
block: pCvSeqBlock; // * current block */
|
||||
ptr: Pointer; // * pointer to element be read next */
|
||||
block_min: Pointer; // * pointer to the beginning of block */
|
||||
block_max: Pointer; // * pointer to the end of block */
|
||||
delta_index: Integer; // * = seq->first->start_index */
|
||||
prev_elem: Pointer; // * pointer to previous element */
|
||||
prev_elem: Pointer; // * pointer to previous element */
|
||||
end;
|
||||
|
||||
{ ****************************************************************************************
|
||||
@ -2374,7 +2363,7 @@ procedure strcpy(var str1: pCVChar; const str2: pCVChar);
|
||||
Var
|
||||
n: Integer;
|
||||
begin
|
||||
n := Length(str2) * SizeOf(CVChar);
|
||||
n := Length(str2) * SizeOf(CVChar);
|
||||
str1 := AllocMem(n);
|
||||
Move(str2^, str1^, n);
|
||||
// CopyMemory(str1, str2, n);
|
||||
@ -2456,13 +2445,13 @@ function cvMat;
|
||||
begin
|
||||
if not(CV_MAT_DEPTH(etype) <= CV_64F) then
|
||||
exit;
|
||||
etype := CV_MAT_TYPE(etype);
|
||||
Result._type := CV_MAT_MAGIC_VAL or CV_MAT_CONT_FLAG or etype;
|
||||
Result.cols := cols;
|
||||
Result.rows := rows;
|
||||
Result.step := Result.cols * CV_ELEM_SIZE(etype);
|
||||
Result.data := data;
|
||||
Result.refcount := nil;
|
||||
etype := CV_MAT_TYPE(etype);
|
||||
Result._type := CV_MAT_MAGIC_VAL or CV_MAT_CONT_FLAG or etype;
|
||||
Result.cols := cols;
|
||||
Result.rows := rows;
|
||||
Result.step := Result.cols * CV_ELEM_SIZE(etype);
|
||||
Result.data := data;
|
||||
Result.refcount := nil;
|
||||
Result.hdr_refcount := 0;
|
||||
end;
|
||||
|
||||
@ -2496,15 +2485,15 @@ end;
|
||||
|
||||
function CvSize;
|
||||
begin
|
||||
Result.width := width;
|
||||
Result.width := width;
|
||||
Result.height := height;
|
||||
end;
|
||||
|
||||
function CvRect;
|
||||
begin
|
||||
Result.x := x;
|
||||
Result.y := y;
|
||||
Result.width := width;
|
||||
Result.x := x;
|
||||
Result.y := y;
|
||||
Result.width := width;
|
||||
Result.height := height;
|
||||
end;
|
||||
|
||||
@ -2579,7 +2568,7 @@ Var
|
||||
begin
|
||||
// if( ((reader).ptr += (elem_size)) >= (reader).block_max )
|
||||
// cvChangeSeqBlock( &(reader), 1 );
|
||||
ptr := @Reader.ptr;
|
||||
ptr := @Reader.ptr;
|
||||
ptr^ := ptr^ + elem_size;
|
||||
if Integer(Reader.ptr) >= Integer(Reader.block_max) then
|
||||
cvChangeSeqBlock(@Reader, 1);
|
||||
@ -2588,9 +2577,9 @@ end;
|
||||
function cvFloor;
|
||||
Var
|
||||
diff: TCv32suf;
|
||||
i: Integer;
|
||||
i : Integer;
|
||||
begin
|
||||
i := cvRound(Value);
|
||||
i := cvRound(Value);
|
||||
diff.f := (Value - i);
|
||||
if diff.i < 0 then
|
||||
Dec(i);
|
||||
@ -2605,9 +2594,9 @@ end;
|
||||
|
||||
function CvTermCriteria;
|
||||
begin
|
||||
Result.cType := _type;
|
||||
Result.cType := _type;
|
||||
Result.max_iter := max_iter;
|
||||
Result.epsilon := epsilon;
|
||||
Result.epsilon := epsilon;
|
||||
end;
|
||||
|
||||
function cvPointTo32f;
|
||||
@ -2786,7 +2775,7 @@ Var
|
||||
depth: Integer;
|
||||
begin
|
||||
// return CV_ELEM_SIZE1(depth)*8 | (depth == CV_8S || depth == CV_16S || depth == CV_32S ? IPL_DEPTH_SIGN : 0);
|
||||
depth := CV_MAT_DEPTH(_type);
|
||||
depth := CV_MAT_DEPTH(_type);
|
||||
Result := CV_ELEM_SIZE1(depth) * 8;
|
||||
if (depth = CV_8S) or (depth = CV_16S) or (depth = CV_32S) then
|
||||
Result := Result or Integer(IPL_DEPTH_SIGN);
|
||||
@ -2810,13 +2799,13 @@ end;
|
||||
function CvBox2D(const cX, cY, width, height, angle: Single): TCvBox2D;
|
||||
begin
|
||||
Result.center := CvPoint2D32f(cX, cY);
|
||||
Result.size := CvSize2D32f(width, height);
|
||||
Result.angle := angle;
|
||||
Result.size := CvSize2D32f(width, height);
|
||||
Result.angle := angle;
|
||||
end;
|
||||
|
||||
function CvSize2D32f(const width, height: Single): TCvSize2D32f;
|
||||
begin
|
||||
Result.width := width;
|
||||
Result.width := width;
|
||||
Result.height := height;
|
||||
end;
|
||||
|
||||
@ -2916,16 +2905,16 @@ end;
|
||||
|
||||
initialization
|
||||
|
||||
CV_SEQ_ELTYPE_POINT := CV_32SC2;
|
||||
CV_SEQ_ELTYPE_CODE := CV_8UC1;
|
||||
CV_SEQ_ELTYPE_POINT := CV_32SC2;
|
||||
CV_SEQ_ELTYPE_CODE := CV_8UC1;
|
||||
CV_SEQ_ELTYPE_POINT3D := CV_32FC3;
|
||||
CV_SEQ_POINT_SET := (CV_SEQ_KIND_GENERIC or CV_SEQ_ELTYPE_POINT);
|
||||
CV_SEQ_POINT3D_SET := (CV_SEQ_KIND_GENERIC or CV_SEQ_ELTYPE_POINT3D);
|
||||
CV_SEQ_POLYLINE := (CV_SEQ_KIND_CURVE or CV_SEQ_ELTYPE_POINT);
|
||||
CV_SEQ_POLYGON := (CV_SEQ_FLAG_CLOSED or CV_SEQ_POLYLINE);
|
||||
CV_SEQ_CONTOUR := CV_SEQ_POLYGON;
|
||||
CV_SEQ_POINT_SET := (CV_SEQ_KIND_GENERIC or CV_SEQ_ELTYPE_POINT);
|
||||
CV_SEQ_POINT3D_SET := (CV_SEQ_KIND_GENERIC or CV_SEQ_ELTYPE_POINT3D);
|
||||
CV_SEQ_POLYLINE := (CV_SEQ_KIND_CURVE or CV_SEQ_ELTYPE_POINT);
|
||||
CV_SEQ_POLYGON := (CV_SEQ_FLAG_CLOSED or CV_SEQ_POLYLINE);
|
||||
CV_SEQ_CONTOUR := CV_SEQ_POLYGON;
|
||||
CV_SEQ_SIMPLE_POLYGON := (CV_SEQ_FLAG_SIMPLE or CV_SEQ_POLYGON);
|
||||
CV_SEQ_CHAIN := (CV_SEQ_KIND_CURVE or CV_SEQ_ELTYPE_CODE);
|
||||
CV_SEQ_CHAIN_CONTOUR := (CV_SEQ_FLAG_CLOSED or CV_SEQ_CHAIN);
|
||||
CV_SEQ_CHAIN := (CV_SEQ_KIND_CURVE or CV_SEQ_ELTYPE_CODE);
|
||||
CV_SEQ_CHAIN_CONTOUR := (CV_SEQ_FLAG_CLOSED or CV_SEQ_CHAIN);
|
||||
|
||||
end.
|
||||
|
@ -42,21 +42,21 @@ interface
|
||||
|
||||
const
|
||||
{$IFDEF DelphiOCVVersion_29}
|
||||
CV_VERSION_EPOCH = '2';
|
||||
CV_VERSION_MAJOR = '4';
|
||||
CV_VERSION_MINOR = '13';
|
||||
CV_VERSION_EPOCH = '2';
|
||||
CV_VERSION_MAJOR = '4';
|
||||
CV_VERSION_MINOR = '13';
|
||||
CV_VERSION_REVISION = '0';
|
||||
{$ELSEIF DEFINED(DelphiOCVVersion_30)}
|
||||
CV_VERSION_EPOCH = '3';
|
||||
CV_VERSION_MAJOR = '0';
|
||||
CV_VERSION_MINOR = '0';
|
||||
CV_VERSION_EPOCH = '3';
|
||||
CV_VERSION_MAJOR = '0';
|
||||
CV_VERSION_MINOR = '0';
|
||||
CV_VERSION_REVISION = '0';
|
||||
{$ENDIF}
|
||||
CV_VERSION = CV_VERSION_EPOCH + '.' + CV_VERSION_MAJOR + '.' + CV_VERSION_MINOR + '.' + CV_VERSION_REVISION;
|
||||
|
||||
// * old style version constants*/
|
||||
CV_MAJOR_VERSION = CV_VERSION_EPOCH;
|
||||
CV_MINOR_VERSION = CV_VERSION_MAJOR;
|
||||
CV_MAJOR_VERSION = CV_VERSION_EPOCH;
|
||||
CV_MINOR_VERSION = CV_VERSION_MAJOR;
|
||||
CV_SUBMINOR_VERSION = CV_VERSION_MINOR;
|
||||
|
||||
CV_VERSION_DLL = CV_VERSION_EPOCH + CV_VERSION_MAJOR + CV_VERSION_MINOR;
|
||||
@ -69,6 +69,7 @@ const
|
||||
{$ENDIF}
|
||||
{$ELSE}
|
||||
{$ENDIF}
|
||||
// -------------------------------
|
||||
core_lib =
|
||||
{$IFDEF MSWINDOWS}
|
||||
CV_DLL_DIR + 'opencv_' +
|
||||
@ -89,6 +90,7 @@ const
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
// -------------------------------
|
||||
highgui_lib = {$IFDEF MSWINDOWS}
|
||||
CV_DLL_DIR + 'opencv_' +
|
||||
{$IFDEF DelphiOCVVersion_29}
|
||||
@ -108,6 +110,7 @@ highgui_lib = {$IFDEF MSWINDOWS}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
// -------------------------------
|
||||
imgproc_lib = {$IFDEF MSWINDOWS}
|
||||
CV_DLL_DIR + 'opencv_' +
|
||||
{$IFDEF DelphiOCVVersion_29}
|
||||
@ -127,6 +130,7 @@ imgproc_lib = {$IFDEF MSWINDOWS}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
// -------------------------------
|
||||
objdetect_lib = {$IFDEF MSWINDOWS}
|
||||
CV_DLL_DIR + 'opencv_' +
|
||||
{$IFDEF DelphiOCVVersion_29}
|
||||
@ -146,6 +150,7 @@ objdetect_lib = {$IFDEF MSWINDOWS}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
// -------------------------------
|
||||
legacy_lib = {$IFDEF MSWINDOWS}
|
||||
CV_DLL_DIR + 'opencv_' +
|
||||
{$IFDEF DelphiOCVVersion_29}
|
||||
@ -165,6 +170,7 @@ legacy_lib = {$IFDEF MSWINDOWS}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
// -------------------------------
|
||||
calib3d_lib = {$IFDEF MSWINDOWS}
|
||||
CV_DLL_DIR + 'opencv_' +
|
||||
{$IFDEF DelphiOCVVersion_29}
|
||||
@ -184,6 +190,7 @@ calib3d_lib = {$IFDEF MSWINDOWS}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
// -------------------------------
|
||||
tracking_lib = {$IFDEF MSWINDOWS}
|
||||
CV_DLL_DIR + 'opencv_' +
|
||||
{$IFDEF DelphiOCVVersion_29}
|
||||
@ -203,6 +210,7 @@ tracking_lib = {$IFDEF MSWINDOWS}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
// -------------------------------
|
||||
nonfree_lib = {$IFDEF MSWINDOWS}
|
||||
CV_DLL_DIR + 'opencv_' +
|
||||
{$IFDEF DelphiOCVVersion_29}
|
||||
@ -222,6 +230,7 @@ nonfree_lib = {$IFDEF MSWINDOWS}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
// -------------------------------
|
||||
opencv_classes_lib = {$IFDEF MSWINDOWS}
|
||||
CV_DLL_DIR + 'opencv_classes' + CV_VERSION_DLL {$IFDEF DEBUG} + 'd'{$ENDIF} + '.dll';
|
||||
{$ELSE}
|
||||
@ -235,6 +244,7 @@ opencv_classes_lib = {$IFDEF MSWINDOWS}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
// -------------------------------
|
||||
opencv_photo_lib = {$IFDEF MSWINDOWS}
|
||||
CV_DLL_DIR + 'opencv_' +
|
||||
{$IFDEF DelphiOCVVersion_29}
|
||||
@ -254,6 +264,31 @@ opencv_photo_lib = {$IFDEF MSWINDOWS}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
// -------------------------------
|
||||
opencv_contrib_lib = {$IFDEF MSWINDOWS}
|
||||
CV_DLL_DIR + 'opencv_' +
|
||||
{$IFDEF DelphiOCVVersion_29}
|
||||
'contrib' +
|
||||
{$ELSEIF DEFINED( DelphiOCVVersion_30)}
|
||||
'world' +
|
||||
{$ENDIF}
|
||||
CV_VERSION_DLL {$IFDEF DEBUG} + 'd'{$ENDIF} + '.dll';
|
||||
{$ELSE}
|
||||
{$IFDEF MACOS}
|
||||
'opencv_contrib.dylib';
|
||||
{$ELSE}
|
||||
{$IFDEF ANDROID}
|
||||
'libopencv_contrib.so';
|
||||
{$ELSE}
|
||||
'libopencv_contrib.so';
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
// -------------------------------
|
||||
//
|
||||
//
|
||||
// -------------------------------
|
||||
//
|
||||
{$IFDEF SAFELOADLIB}
|
||||
function ocvLoadLibrary(const Name: String): Cardinal;
|
||||
function ocvFreeLibrary(const LibHandle: Cardinal; const Remove: Boolean = true): Boolean;
|
||||
|
79
source/opencv_classes/contrib_prx.cpp
Normal file
79
source/opencv_classes/contrib_prx.cpp
Normal file
@ -0,0 +1,79 @@
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
namespace cv
|
||||
{
|
||||
|
||||
//////////////////// FaceRecognizer ////////////////////
|
||||
ICLASS_API FaceRecognizer* __stdcall Create_EigenFaceRecognizer(int num_components, double threshold)
|
||||
{
|
||||
Ptr<FaceRecognizer> r = createEigenFaceRecognizer(num_components, threshold);
|
||||
r.addref();
|
||||
return r;
|
||||
}
|
||||
ICLASS_API FaceRecognizer* __stdcall Create_FisherFaceRecognizer(int num_components, double threshold)
|
||||
{
|
||||
Ptr<FaceRecognizer> r = createFisherFaceRecognizer(num_components, threshold);
|
||||
r.addref();
|
||||
return r;
|
||||
}
|
||||
|
||||
ICLASS_API FaceRecognizer* __stdcall Create_LBPHFaceRecognizer(int radius, int neighbors,
|
||||
int grid_x, int grid_y, double threshold)
|
||||
{
|
||||
Ptr<FaceRecognizer> r = createLBPHFaceRecognizer(radius, neighbors, grid_x, grid_y, threshold);
|
||||
r.addref();
|
||||
return r;
|
||||
}
|
||||
|
||||
ICLASS_API void __stdcall FaceRecognizerLoad(FaceRecognizer* e, char* FileName)
|
||||
{
|
||||
return e->load(FileName);
|
||||
};
|
||||
|
||||
ICLASS_API void __stdcall FaceRecognizerSave(FaceRecognizer* e, char* FileName)
|
||||
{
|
||||
return e->save(FileName);
|
||||
};
|
||||
|
||||
ICLASS_API int __stdcall FaceRecognizerPredict1(FaceRecognizer* e, IplImage* scr)
|
||||
{
|
||||
return e->predict(Mat(scr));
|
||||
};
|
||||
|
||||
ICLASS_API void __stdcall FaceRecognizerPredict2(FaceRecognizer* e, IplImage* scr, CV_OUT int &label, CV_OUT double &confidence)
|
||||
{
|
||||
e->predict(Mat(scr), label, confidence);
|
||||
};
|
||||
|
||||
ICLASS_API void __stdcall FaceRecognizerTrain(FaceRecognizer* e, int n, IplImage** scr, int* lab)
|
||||
{
|
||||
vector<Mat> images;
|
||||
vector<int> labels;
|
||||
for (int i = 0; i < n; i++)
|
||||
{
|
||||
images.push_back(Mat(scr[i]));
|
||||
labels.push_back(lab[i]);
|
||||
}
|
||||
e->train(images, labels);
|
||||
};
|
||||
|
||||
ICLASS_API void __stdcall FaceRecognizerUpdate(FaceRecognizer* e, int n, IplImage** scr, int* lab)
|
||||
{
|
||||
vector<Mat> images;
|
||||
vector<int> labels;
|
||||
for (int i = 0; i < n; i++)
|
||||
{
|
||||
images.push_back(Mat(scr[i]));
|
||||
labels.push_back(lab[i]);
|
||||
}
|
||||
e->update(images, labels);
|
||||
};
|
||||
|
||||
ICLASS_API void __stdcall DestroyFaceRecognizer(FaceRecognizer* e)
|
||||
{
|
||||
//while(e.refcount)
|
||||
//e.release();
|
||||
//delete e;
|
||||
};
|
||||
}
|
@ -2,13 +2,6 @@
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "opencv2/core/mat.hpp"
|
||||
#include "opencv2/videoio.hpp"
|
||||
#include "opencv2/objdetect.hpp"
|
||||
|
||||
|
||||
#define ICLASS_API extern "C" __declspec(dllexport)
|
||||
//__stdcall
|
||||
|
||||
namespace cv
|
||||
{
|
||||
@ -150,9 +143,9 @@ namespace cv
|
||||
return e->getFeatureType();
|
||||
}
|
||||
|
||||
ICLASS_API bool __stdcall CascadeClassifier_convert(CascadeClassifier* e, char* oldcascade, char* newcascade)
|
||||
{
|
||||
return e->convert(oldcascade, newcascade);
|
||||
}
|
||||
//ICLASS_API bool __stdcall CascadeClassifier_convert(CascadeClassifier* e, char* oldcascade, char* newcascade)
|
||||
//{
|
||||
// return e->convert(oldcascade, newcascade);
|
||||
// }
|
||||
|
||||
}
|
||||
|
@ -69,28 +69,28 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<TargetExt>2413d.dll</TargetExt>
|
||||
<OutDir>..\..\bin\win32\</OutDir>
|
||||
<IncludePath>D:\opencv3\build\include\;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>D:\opencv3\build\x86\vc12\lib\;$(LibraryPath)</LibraryPath>
|
||||
<OutDir>..\..\bin\Win32\</OutDir>
|
||||
<IncludePath>D:\opencv\build\include\;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>D:\OpenCV\build\x86\vc12\lib\;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<IncludePath>D:\opencv3\build\include\;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>D:\opencv3\build\x86\vc12\lib\;$(LibraryPath)</LibraryPath>
|
||||
<IncludePath>D:\opencv\build\include\;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>D:\OpenCV\build\x86\vc12\staticlib\;$(LibraryPath)</LibraryPath>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<TargetExt>2413d.dll</TargetExt>
|
||||
<OutDir>..\..\bin\win64\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>..\..\bin\win32\</OutDir>
|
||||
<OutDir>..\..\bin\Win32\</OutDir>
|
||||
<TargetExt>2413.dll</TargetExt>
|
||||
<IncludePath>D:\opencv3\build\include\;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>D:\opencv3\build\x86\vc12\lib\;$(LibraryPath)</LibraryPath>
|
||||
<IncludePath>D:\opencv\build\include\;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>D:\OpenCV\build\x86\vc12\lib\;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<TargetExt>2413.dll</TargetExt>
|
||||
<IncludePath>D:\opencv3\build\include\;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>D:\opencv3\build\x86\vc12\lib\;$(LibraryPath)</LibraryPath>
|
||||
<IncludePath>D:\opencv\build\include\;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>D:\OpenCV\build\x86\vc12\staticlib\;$(LibraryPath)</LibraryPath>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>..\..\bin\win64\</OutDir>
|
||||
</PropertyGroup>
|
||||
@ -104,7 +104,7 @@
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>opencv_ts300d.lib;opencv_world300d.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>opencv_calib3d2413d.lib;opencv_contrib2413d.lib;opencv_core2413d.lib;opencv_features2d2413d.lib;opencv_flann2413d.lib;opencv_gpu2413d.lib;opencv_highgui2413d.lib;opencv_imgproc2413d.lib;opencv_legacy2413d.lib;opencv_ml2413d.lib;opencv_nonfree2413d.lib;opencv_objdetect2413d.lib;opencv_ocl2413d.lib;opencv_photo2413d.lib;opencv_stitching2413d.lib;opencv_superres2413d.lib;opencv_ts2413d.lib;opencv_video2413d.lib;opencv_videostab2413d.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
@ -134,7 +134,7 @@
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>opencv_ts300.lib;opencv_world300.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>opencv_calib3d2413.lib;opencv_contrib2413.lib;opencv_core2413.lib;opencv_features2d2413.lib;opencv_flann2413.lib;opencv_gpu2413.lib;opencv_highgui2413.lib;opencv_imgproc2413.lib;opencv_legacy2413.lib;opencv_ml2413.lib;opencv_nonfree2413.lib;opencv_objdetect2413.lib;opencv_ocl2413.lib;opencv_photo2413.lib;opencv_stitching2413.lib;opencv_superres2413.lib;opencv_ts2413.lib;opencv_video2413.lib;opencv_videostab2413.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
@ -162,6 +162,7 @@
|
||||
<ClInclude Include="targetver.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="contrib_prx.cpp" />
|
||||
<ClCompile Include="dllmain.cpp">
|
||||
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
|
||||
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</CompileAsManaged>
|
||||
|
@ -35,5 +35,8 @@
|
||||
<ClCompile Include="dllmain.cpp">
|
||||
<Filter>Файлы исходного кода</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="contrib_prx.cpp">
|
||||
<Filter>Файлы исходного кода</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -8,9 +8,17 @@
|
||||
#include "targetver.h"
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN // Исключите редко используемые компоненты из заголовков Windows
|
||||
|
||||
#define ICLASS_API extern "C" __declspec(dllexport)
|
||||
//__stdcall
|
||||
|
||||
// Файлы заголовков Windows:
|
||||
#include <windows.h>
|
||||
|
||||
#include "opencv2/core/core.hpp"
|
||||
#include "opencv2/highgui/highgui.hpp"
|
||||
#include "opencv2/objdetect.hpp"
|
||||
#include "opencv2/contrib/contrib.hpp"
|
||||
|
||||
|
||||
// TODO: Установите здесь ссылки на дополнительные заголовки, требующиеся для программы
|
||||
|
@ -6,6 +6,7 @@ interface
|
||||
|
||||
Const
|
||||
cResourceMedia = '..\..\resource\media\';
|
||||
cResourceFaces = '..\..\resource\faces\';
|
||||
cResourceFaceDetect = '..\..\resource\facedetectxml\';
|
||||
cResourceResultDefault = '..\..\resource\result\';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user