feat: 切换后端至PaddleOCR-NCNN,切换工程为CMake

1.项目后端整体迁移至PaddleOCR-NCNN算法,已通过基本的兼容性测试
2.工程改为使用CMake组织,后续为了更好地兼容第三方库,不再提供QMake工程
3.重整权利声明文件,重整代码工程,确保最小化侵权风险

Log: 切换后端至PaddleOCR-NCNN,切换工程为CMake
Change-Id: I4d5d2c5d37505a4a24b389b1a4c5d12f17bfa38c
This commit is contained in:
wangzhengyang
2022-05-10 09:54:44 +08:00
parent ecdd171c6f
commit 718c41634f
10018 changed files with 3593797 additions and 186748 deletions

View File

@ -0,0 +1,407 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
5B14CF822452EED3003438BE /* OpenCV.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B14CF812452EED3003438BE /* OpenCV.framework */; };
5B79BD652439FF020062DD99 /* DetectionBasedTracker.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5B79BD642439FF020062DD99 /* DetectionBasedTracker.mm */; };
5B8C4C2D243814E9003D9176 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B8C4C2C243814A0003D9176 /* libc++.tbd */; };
5B8C4C2F2438383D003D9176 /* lbpcascade_frontalface.xml in Resources */ = {isa = PBXBuildFile; fileRef = 5B8C4C2E2438383D003D9176 /* lbpcascade_frontalface.xml */; };
5BBDB48A240D380F00BB10FE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BBDB489240D380F00BB10FE /* AppDelegate.swift */; };
5BBDB48E240D380F00BB10FE /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BBDB48D240D380F00BB10FE /* ViewController.swift */; };
5BBDB491240D380F00BB10FE /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5BBDB48F240D380F00BB10FE /* Main.storyboard */; };
5BBDB493240D381000BB10FE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5BBDB492240D381000BB10FE /* Assets.xcassets */; };
5BBDB496240D381000BB10FE /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5BBDB494240D381000BB10FE /* LaunchScreen.storyboard */; };
5BBDB517241923C800BB10FE /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5BBDB516241923C800BB10FE /* AVFoundation.framework */; };
5BBDB5192419241200BB10FE /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5BBDB5182419241200BB10FE /* CoreMedia.framework */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
5B14CF812452EED3003438BE /* OpenCV.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenCV.framework; path = ../../../OpenCV.framework; sourceTree = "<group>"; };
5B79BD622439FEB60062DD99 /* DetectionBasedTracker.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DetectionBasedTracker.h; sourceTree = "<group>"; };
5B79BD632439FF020062DD99 /* FaceDetection-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "FaceDetection-Bridging-Header.h"; sourceTree = "<group>"; };
5B79BD642439FF020062DD99 /* DetectionBasedTracker.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = DetectionBasedTracker.mm; sourceTree = "<group>"; };
5B8C4C2C243814A0003D9176 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; };
5B8C4C2E2438383D003D9176 /* lbpcascade_frontalface.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = lbpcascade_frontalface.xml; sourceTree = "<group>"; };
5BBDB486240D380F00BB10FE /* FaceDetection.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FaceDetection.app; sourceTree = BUILT_PRODUCTS_DIR; };
5BBDB489240D380F00BB10FE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
5BBDB48D240D380F00BB10FE /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
5BBDB490240D380F00BB10FE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
5BBDB492240D381000BB10FE /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
5BBDB495240D381000BB10FE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
5BBDB497240D381000BB10FE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
5BBDB516241923C800BB10FE /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
5BBDB5182419241200BB10FE /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
5BBDB483240D380F00BB10FE /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
5BBDB5192419241200BB10FE /* CoreMedia.framework in Frameworks */,
5B8C4C2D243814E9003D9176 /* libc++.tbd in Frameworks */,
5BBDB517241923C800BB10FE /* AVFoundation.framework in Frameworks */,
5B14CF822452EED3003438BE /* OpenCV.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
5BBDB47D240D380F00BB10FE = {
isa = PBXGroup;
children = (
5BBDB488240D380F00BB10FE /* FaceDetection */,
5BBDB487240D380F00BB10FE /* Products */,
5BBDB515241923C800BB10FE /* Frameworks */,
);
sourceTree = "<group>";
};
5BBDB487240D380F00BB10FE /* Products */ = {
isa = PBXGroup;
children = (
5BBDB486240D380F00BB10FE /* FaceDetection.app */,
);
name = Products;
sourceTree = "<group>";
};
5BBDB488240D380F00BB10FE /* FaceDetection */ = {
isa = PBXGroup;
children = (
5B14CF812452EED3003438BE /* OpenCV.framework */,
5B8C4C2E2438383D003D9176 /* lbpcascade_frontalface.xml */,
5BBDB489240D380F00BB10FE /* AppDelegate.swift */,
5BBDB48D240D380F00BB10FE /* ViewController.swift */,
5BBDB48F240D380F00BB10FE /* Main.storyboard */,
5BBDB492240D381000BB10FE /* Assets.xcassets */,
5BBDB494240D381000BB10FE /* LaunchScreen.storyboard */,
5BBDB497240D381000BB10FE /* Info.plist */,
5B79BD622439FEB60062DD99 /* DetectionBasedTracker.h */,
5B79BD642439FF020062DD99 /* DetectionBasedTracker.mm */,
5B79BD632439FF020062DD99 /* FaceDetection-Bridging-Header.h */,
);
path = FaceDetection;
sourceTree = "<group>";
};
5BBDB515241923C800BB10FE /* Frameworks */ = {
isa = PBXGroup;
children = (
5B8C4C2C243814A0003D9176 /* libc++.tbd */,
5BBDB5182419241200BB10FE /* CoreMedia.framework */,
5BBDB516241923C800BB10FE /* AVFoundation.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
5BBDB485240D380F00BB10FE /* FaceDetection */ = {
isa = PBXNativeTarget;
buildConfigurationList = 5BBDB4B0240D381000BB10FE /* Build configuration list for PBXNativeTarget "FaceDetection" */;
buildPhases = (
5BBDB482240D380F00BB10FE /* Sources */,
5BBDB483240D380F00BB10FE /* Frameworks */,
5BBDB484240D380F00BB10FE /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = FaceDetection;
productName = FaceDetection;
productReference = 5BBDB486240D380F00BB10FE /* FaceDetection.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
5BBDB47E240D380F00BB10FE /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1130;
LastUpgradeCheck = 1130;
ORGANIZATIONNAME = OpenCV;
TargetAttributes = {
5BBDB485240D380F00BB10FE = {
CreatedOnToolsVersion = 11.3.1;
LastSwiftMigration = 1130;
};
};
};
buildConfigurationList = 5BBDB481240D380F00BB10FE /* Build configuration list for PBXProject "FaceDetection" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 5BBDB47D240D380F00BB10FE;
productRefGroup = 5BBDB487240D380F00BB10FE /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
5BBDB485240D380F00BB10FE /* FaceDetection */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
5BBDB484240D380F00BB10FE /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
5BBDB496240D381000BB10FE /* LaunchScreen.storyboard in Resources */,
5BBDB493240D381000BB10FE /* Assets.xcassets in Resources */,
5BBDB491240D380F00BB10FE /* Main.storyboard in Resources */,
5B8C4C2F2438383D003D9176 /* lbpcascade_frontalface.xml in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
5BBDB482240D380F00BB10FE /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
5B79BD652439FF020062DD99 /* DetectionBasedTracker.mm in Sources */,
5BBDB48E240D380F00BB10FE /* ViewController.swift in Sources */,
5BBDB48A240D380F00BB10FE /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
5BBDB48F240D380F00BB10FE /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
5BBDB490240D380F00BB10FE /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
5BBDB494240D381000BB10FE /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
5BBDB495240D381000BB10FE /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
5BBDB4AE240D381000BB10FE /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
FRAMEWORK_SEARCH_PATHS = ../..;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = "../../OpenCV/**";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "";
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OBJC_BRIDGING_HEADER = "FaceDetection/FaceDetection-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
5BBDB4AF240D381000BB10FE /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
FRAMEWORK_SEARCH_PATHS = ../..;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = "../../OpenCV/**";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
OTHER_LDFLAGS = "";
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OBJC_BRIDGING_HEADER = "FaceDetection/FaceDetection-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
5BBDB4B1240D381000BB10FE /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = NO;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = "";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/../..",
);
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../../OpenCV.framework/Headers";
INFOPLIST_FILE = FaceDetection/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
OTHER_SWIFT_FLAGS = "-Xcc -Wno-incomplete-umbrella";
PRODUCT_BUNDLE_IDENTIFIER = org.opencv.FaceDetection;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "FaceDetection/FaceDetection-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
5BBDB4B2240D381000BB10FE /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = NO;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = "";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/../..",
);
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../../OpenCV.framework/Headers";
INFOPLIST_FILE = FaceDetection/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
OTHER_SWIFT_FLAGS = "-Xcc -Wno-incomplete-umbrella";
PRODUCT_BUNDLE_IDENTIFIER = org.opencv.FaceDetection;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "FaceDetection/FaceDetection-Bridging-Header.h";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
5BBDB481240D380F00BB10FE /* Build configuration list for PBXProject "FaceDetection" */ = {
isa = XCConfigurationList;
buildConfigurations = (
5BBDB4AE240D381000BB10FE /* Debug */,
5BBDB4AF240D381000BB10FE /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
5BBDB4B0240D381000BB10FE /* Build configuration list for PBXNativeTarget "FaceDetection" */ = {
isa = XCConfigurationList;
buildConfigurations = (
5BBDB4B1240D381000BB10FE /* Debug */,
5BBDB4B2240D381000BB10FE /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 5BBDB47E240D380F00BB10FE /* Project object */;
}

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

View File

@ -0,0 +1,19 @@
//
// AppDelegate.swift
//
// Created by Giles Payne on 2020/03/02.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 638 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 946 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -0,0 +1,158 @@
{
"images" : [
{
"filename" : "40.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"filename" : "60.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"filename" : "29.png",
"idiom" : "iphone",
"scale" : "1x",
"size" : "29x29"
},
{
"filename" : "58.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"filename" : "87.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"filename" : "80.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"filename" : "120.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"filename" : "57.png",
"idiom" : "iphone",
"scale" : "1x",
"size" : "57x57"
},
{
"filename" : "114.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "57x57"
},
{
"filename" : "120.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"filename" : "180.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"filename" : "20.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"filename" : "40.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"filename" : "29.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"filename" : "58.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"filename" : "40.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"filename" : "80.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"filename" : "50.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "50x50"
},
{
"filename" : "100.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "50x50"
},
{
"filename" : "72.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "72x72"
},
{
"filename" : "144.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "72x72"
},
{
"filename" : "76.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"filename" : "152.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"filename" : "167.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"filename" : "appstore.png",
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

View File

@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="OpenCVSwiftTestMobile" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7db-Xp-qM4" userLabel="CameraOutputHolder">
<rect key="frame" x="0.0" y="44" width="414" height="818"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="6Tk-OE-BBY" firstAttribute="bottom" secondItem="7db-Xp-qM4" secondAttribute="bottom" id="0hV-Uz-R3z"/>
<constraint firstItem="7db-Xp-qM4" firstAttribute="top" secondItem="6Tk-OE-BBY" secondAttribute="top" id="GbA-NU-Qxp"/>
<constraint firstItem="6Tk-OE-BBY" firstAttribute="trailing" secondItem="7db-Xp-qM4" secondAttribute="trailing" id="YS2-18-VLx"/>
<constraint firstItem="7db-Xp-qM4" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" id="amh-MA-s7b"/>
</constraints>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
<connections>
<outlet property="cameraHolder" destination="7db-Xp-qM4" id="iWY-GM-D7N"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="137.68115942028987" y="133.92857142857142"/>
</scene>
</scenes>
</document>

View File

@ -0,0 +1,32 @@
//
// DetectionBasedTracker.h
//
// Created by Giles Payne on 2020/04/05.
//
#pragma once
#ifdef __cplusplus
#import <OpenCV/OpenCV.h>
#endif
#import <Foundation/Foundation.h>
@class Rect2i;
@class Mat;
@interface DetectionBasedTracker : NSObject
- (instancetype)init NS_UNAVAILABLE;
- (instancetype)initWithCascadeName:(NSString*)cascadeName minFaceSize:(int)minFaceSize;
- (void)start;
- (void)stop;
- (void)setFaceSize:(int)size;
- (void)detect:(Mat*)imageGray faces:(NSMutableArray<Rect2i*>*)faces;
@end

View File

@ -0,0 +1,85 @@
//
// DetectionBasedTracker.mm
//
// Created by Giles Payne on 2020/04/05.
//
#import "DetectionBasedTracker.h"
#import "Mat.h"
#import "Rect2i.h"
#import "CVObjcUtil.h"
class CascadeDetectorAdapter: public cv::DetectionBasedTracker::IDetector
{
public:
CascadeDetectorAdapter(cv::Ptr<cv::CascadeClassifier> detector):IDetector(), Detector(detector) {}
void detect(const cv::Mat &Image, std::vector<cv::Rect> &objects)
{
Detector->detectMultiScale(Image, objects, scaleFactor, minNeighbours, 0, minObjSize, maxObjSize);
}
virtual ~CascadeDetectorAdapter() {}
private:
CascadeDetectorAdapter();
cv::Ptr<cv::CascadeClassifier> Detector;
};
struct DetectorAgregator
{
cv::Ptr<CascadeDetectorAdapter> mainDetector;
cv::Ptr<CascadeDetectorAdapter> trackingDetector;
cv::Ptr<cv::DetectionBasedTracker> tracker;
DetectorAgregator(cv::Ptr<CascadeDetectorAdapter>& _mainDetector, cv::Ptr<CascadeDetectorAdapter>& _trackingDetector):mainDetector(_mainDetector), trackingDetector(_trackingDetector) {
CV_Assert(_mainDetector);
CV_Assert(_trackingDetector);
cv::DetectionBasedTracker::Parameters DetectorParams;
tracker = cv::makePtr<cv::DetectionBasedTracker>(mainDetector, trackingDetector, DetectorParams);
}
};
@implementation DetectionBasedTracker {
DetectorAgregator* agregator;
}
- (instancetype)initWithCascadeName:(NSString*)cascadeName minFaceSize:(int)faceSize {
self = [super init];
if (self) {
auto mainDetector = cv::makePtr<CascadeDetectorAdapter>(cv::makePtr<cv::CascadeClassifier>(cascadeName.UTF8String));
auto trackingDetector = cv::makePtr<CascadeDetectorAdapter>(
cv::makePtr<cv::CascadeClassifier>(cascadeName.UTF8String));
agregator = new DetectorAgregator(mainDetector, trackingDetector);
if (faceSize > 0) {
agregator->mainDetector->setMinObjectSize(cv::Size(faceSize, faceSize));
}
}
return self;
}
- (void)dealloc
{
delete agregator;
}
- (void)start {
agregator->tracker->run();
}
- (void)stop {
agregator->tracker->stop();
}
- (void)setFaceSize:(int)size {
agregator->mainDetector->setMinObjectSize(cv::Size(size, size));
}
- (void)detect:(Mat*)imageGray faces:(NSMutableArray<Rect2i*>*)faces {
std::vector<cv::Rect> rectFaces;
agregator->tracker->process(*((cv::Mat*)imageGray.nativePtr));
agregator->tracker->getObjects(rectFaces);
CV2OBJC(cv::Rect, Rect2i, rectFaces, faces);
}
@end

View File

@ -0,0 +1,5 @@
//
// Use this file to import your target's public headers that you would like to expose to Swift.
//
#import "DetectionBasedTracker.h"

View File

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSCameraUsageDescription</key>
<string>Please allow access to the camera for image processing</string>
<key>UIUserInterfaceStyle</key>
<string>Light</string>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>

View File

@ -0,0 +1,92 @@
//
// ViewController.swift
//
// Created by Giles Payne on 2020/03/02.
//
import UIKit
import OpenCV
extension Rect {
func rotateClockwise(parentHeight:Int32) {
let tmpX = self.x
self.x = parentHeight - (self.y + self.height)
self.y = tmpX
swapDims()
}
func rotateCounterclockwise(parentWidth:Int32) {
let tmpY = self.y
self.y = parentWidth - (self.x + self.width)
self.x = tmpY
swapDims()
}
func swapDims() {
let tmpWidth = self.width
self.width = self.height
self.height = tmpWidth
}
}
class ViewController: UIViewController, CvVideoCameraDelegate2 {
let swiftDetector = CascadeClassifier(filename: Bundle(for: ViewController.self).path(forResource:"lbpcascade_frontalface", ofType:"xml")!)
let nativeDetector = DetectionBasedTracker(cascadeName: Bundle(for: ViewController.self).path(forResource:"lbpcascade_frontalface", ofType:"xml")!, minFaceSize: 0)
var rgba: Mat? = nil
var gray: Mat = Mat()
var relativeFaceSize: Float = 0.2
var absoluteFaceSize: Int32 = 0
let FACE_RECT_COLOR = Scalar(0.0, 255.0, 0.0, 255.0)
let FACE_RECT_THICKNESS: Int32 = 4
func processImage(_ image: Mat!) {
let orientation = UIDevice.current.orientation
switch orientation {
case .landscapeLeft:
rgba = Mat()
Core.rotate(src: image, dst: rgba!, rotateCode: .ROTATE_90_COUNTERCLOCKWISE)
case .landscapeRight:
rgba = Mat()
Core.rotate(src: image, dst: rgba!, rotateCode: .ROTATE_90_CLOCKWISE)
default:
rgba = image
}
Imgproc.cvtColor(src: rgba!, dst: gray, code: .COLOR_RGB2GRAY)
if (absoluteFaceSize == 0) {
let height = gray.rows()
if (round(Float(height) * relativeFaceSize) > 0) {
absoluteFaceSize = Int32(round(Float(height) * relativeFaceSize))
}
}
var faces = [Rect]()
swiftDetector.detectMultiScale(image: gray, objects: &faces, scaleFactor: 1.1, minNeighbors: Int32(2), flags: Int32(2), minSize: Size(width: absoluteFaceSize, height: absoluteFaceSize), maxSize: Size())
//let facesArray = NSMutableArray()
//nativeDetector!.detect(gray, faces: facesArray)
//faces.append(contentsOf: facesArray)
for face in faces {
if orientation == .landscapeLeft {
face.rotateClockwise(parentHeight: gray.rows())
} else if orientation == .landscapeRight {
face.rotateCounterclockwise(parentWidth: gray.cols())
}
Imgproc.rectangle(img: image, pt1: face.tl(), pt2: face.br(), color: FACE_RECT_COLOR, thickness: FACE_RECT_THICKNESS)
}
}
var camera: CvVideoCamera2? = nil
@IBOutlet weak var cameraHolder: UIView!
override func viewDidLoad() {
super.viewDidLoad()
camera = CvVideoCamera2(parentView: cameraHolder)
camera?.rotateVideo = true
camera?.delegate = self
camera?.start()
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,423 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objects = {
/* Begin PBXBuildFile section */
5B79BD652439FF020062DD99 /* DetectionBasedTracker.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5B79BD642439FF020062DD99 /* DetectionBasedTracker.mm */; };
5B8C4C2D243814E9003D9176 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B8C4C2C243814A0003D9176 /* libc++.tbd */; };
5B8C4C2F2438383D003D9176 /* lbpcascade_frontalface.xml in Resources */ = {isa = PBXBuildFile; fileRef = 5B8C4C2E2438383D003D9176 /* lbpcascade_frontalface.xml */; };
5BBDB48A240D380F00BB10FE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BBDB489240D380F00BB10FE /* AppDelegate.swift */; };
5BBDB48E240D380F00BB10FE /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BBDB48D240D380F00BB10FE /* ViewController.swift */; };
5BBDB491240D380F00BB10FE /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5BBDB48F240D380F00BB10FE /* Main.storyboard */; };
5BBDB493240D381000BB10FE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5BBDB492240D381000BB10FE /* Assets.xcassets */; };
5BBDB496240D381000BB10FE /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5BBDB494240D381000BB10FE /* LaunchScreen.storyboard */; };
5BBDB517241923C800BB10FE /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5BBDB516241923C800BB10FE /* AVFoundation.framework */; };
5BBDB5192419241200BB10FE /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5BBDB5182419241200BB10FE /* CoreMedia.framework */; };
5BE7205A25201437004E84AE /* OpenCV.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B14CF812452EED3003438BE /* OpenCV.framework */; };
5BE7205B25201437004E84AE /* OpenCV.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 5B14CF812452EED3003438BE /* OpenCV.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
5BE7205C25201437004E84AE /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
5BE7205B25201437004E84AE /* OpenCV.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
5B14CF812452EED3003438BE /* OpenCV.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenCV.framework; path = ../../../OpenCV.framework; sourceTree = "<group>"; };
5B79BD622439FEB60062DD99 /* DetectionBasedTracker.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DetectionBasedTracker.h; sourceTree = "<group>"; };
5B79BD632439FF020062DD99 /* FaceDetection-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "FaceDetection-Bridging-Header.h"; sourceTree = "<group>"; };
5B79BD642439FF020062DD99 /* DetectionBasedTracker.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = DetectionBasedTracker.mm; sourceTree = "<group>"; };
5B8C4C2C243814A0003D9176 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; };
5B8C4C2E2438383D003D9176 /* lbpcascade_frontalface.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = lbpcascade_frontalface.xml; sourceTree = "<group>"; };
5BBDB486240D380F00BB10FE /* FaceDetection.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FaceDetection.app; sourceTree = BUILT_PRODUCTS_DIR; };
5BBDB489240D380F00BB10FE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
5BBDB48D240D380F00BB10FE /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
5BBDB490240D380F00BB10FE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
5BBDB492240D381000BB10FE /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
5BBDB495240D381000BB10FE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
5BBDB497240D381000BB10FE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
5BBDB516241923C800BB10FE /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
5BBDB5182419241200BB10FE /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
5BBDB483240D380F00BB10FE /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
5BBDB5192419241200BB10FE /* CoreMedia.framework in Frameworks */,
5B8C4C2D243814E9003D9176 /* libc++.tbd in Frameworks */,
5BBDB517241923C800BB10FE /* AVFoundation.framework in Frameworks */,
5BE7205A25201437004E84AE /* OpenCV.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
5BBDB47D240D380F00BB10FE = {
isa = PBXGroup;
children = (
5BBDB488240D380F00BB10FE /* FaceDetection */,
5BBDB487240D380F00BB10FE /* Products */,
5BBDB515241923C800BB10FE /* Frameworks */,
);
sourceTree = "<group>";
};
5BBDB487240D380F00BB10FE /* Products */ = {
isa = PBXGroup;
children = (
5BBDB486240D380F00BB10FE /* FaceDetection.app */,
);
name = Products;
sourceTree = "<group>";
};
5BBDB488240D380F00BB10FE /* FaceDetection */ = {
isa = PBXGroup;
children = (
5B14CF812452EED3003438BE /* OpenCV.framework */,
5B8C4C2E2438383D003D9176 /* lbpcascade_frontalface.xml */,
5BBDB489240D380F00BB10FE /* AppDelegate.swift */,
5BBDB48D240D380F00BB10FE /* ViewController.swift */,
5BBDB48F240D380F00BB10FE /* Main.storyboard */,
5BBDB492240D381000BB10FE /* Assets.xcassets */,
5BBDB494240D381000BB10FE /* LaunchScreen.storyboard */,
5BBDB497240D381000BB10FE /* Info.plist */,
5B79BD622439FEB60062DD99 /* DetectionBasedTracker.h */,
5B79BD642439FF020062DD99 /* DetectionBasedTracker.mm */,
5B79BD632439FF020062DD99 /* FaceDetection-Bridging-Header.h */,
);
path = FaceDetection;
sourceTree = "<group>";
};
5BBDB515241923C800BB10FE /* Frameworks */ = {
isa = PBXGroup;
children = (
5B8C4C2C243814A0003D9176 /* libc++.tbd */,
5BBDB5182419241200BB10FE /* CoreMedia.framework */,
5BBDB516241923C800BB10FE /* AVFoundation.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
5BBDB485240D380F00BB10FE /* FaceDetection */ = {
isa = PBXNativeTarget;
buildConfigurationList = 5BBDB4B0240D381000BB10FE /* Build configuration list for PBXNativeTarget "FaceDetection" */;
buildPhases = (
5BBDB482240D380F00BB10FE /* Sources */,
5BBDB483240D380F00BB10FE /* Frameworks */,
5BBDB484240D380F00BB10FE /* Resources */,
5BE7205C25201437004E84AE /* Embed Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = FaceDetection;
productName = FaceDetection;
productReference = 5BBDB486240D380F00BB10FE /* FaceDetection.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
5BBDB47E240D380F00BB10FE /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1130;
LastUpgradeCheck = 1130;
ORGANIZATIONNAME = OpenCV;
TargetAttributes = {
5BBDB485240D380F00BB10FE = {
CreatedOnToolsVersion = 11.3.1;
LastSwiftMigration = 1130;
};
};
};
buildConfigurationList = 5BBDB481240D380F00BB10FE /* Build configuration list for PBXProject "FaceDetectionDynamic" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 5BBDB47D240D380F00BB10FE;
productRefGroup = 5BBDB487240D380F00BB10FE /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
5BBDB485240D380F00BB10FE /* FaceDetection */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
5BBDB484240D380F00BB10FE /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
5BBDB496240D381000BB10FE /* LaunchScreen.storyboard in Resources */,
5BBDB493240D381000BB10FE /* Assets.xcassets in Resources */,
5BBDB491240D380F00BB10FE /* Main.storyboard in Resources */,
5B8C4C2F2438383D003D9176 /* lbpcascade_frontalface.xml in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
5BBDB482240D380F00BB10FE /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
5B79BD652439FF020062DD99 /* DetectionBasedTracker.mm in Sources */,
5BBDB48E240D380F00BB10FE /* ViewController.swift in Sources */,
5BBDB48A240D380F00BB10FE /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
5BBDB48F240D380F00BB10FE /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
5BBDB490240D380F00BB10FE /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
5BBDB494240D381000BB10FE /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
5BBDB495240D381000BB10FE /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
5BBDB4AE240D381000BB10FE /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
FRAMEWORK_SEARCH_PATHS = ../..;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = "../../OpenCV/**";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "";
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OBJC_BRIDGING_HEADER = "FaceDetection/FaceDetection-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
5BBDB4AF240D381000BB10FE /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
FRAMEWORK_SEARCH_PATHS = ../..;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = "../../OpenCV/**";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
OTHER_LDFLAGS = "";
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OBJC_BRIDGING_HEADER = "FaceDetection/FaceDetection-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
5BBDB4B1240D381000BB10FE /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = NO;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = "";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/../..",
);
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../../OpenCV.framework/Headers";
INFOPLIST_FILE = FaceDetection/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
OTHER_SWIFT_FLAGS = "-Xcc -Wno-incomplete-umbrella";
PRODUCT_BUNDLE_IDENTIFIER = org.opencv.FaceDetection;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "FaceDetection/FaceDetection-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
5BBDB4B2240D381000BB10FE /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = NO;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = "";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/../..",
);
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../../OpenCV.framework/Headers";
INFOPLIST_FILE = FaceDetection/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
OTHER_SWIFT_FLAGS = "-Xcc -Wno-incomplete-umbrella";
PRODUCT_BUNDLE_IDENTIFIER = org.opencv.FaceDetection;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "FaceDetection/FaceDetection-Bridging-Header.h";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
5BBDB481240D380F00BB10FE /* Build configuration list for PBXProject "FaceDetectionDynamic" */ = {
isa = XCConfigurationList;
buildConfigurations = (
5BBDB4AE240D381000BB10FE /* Debug */,
5BBDB4AF240D381000BB10FE /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
5BBDB4B0240D381000BB10FE /* Build configuration list for PBXNativeTarget "FaceDetection" */ = {
isa = XCConfigurationList;
buildConfigurations = (
5BBDB4B1240D381000BB10FE /* Debug */,
5BBDB4B2240D381000BB10FE /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 5BBDB47E240D380F00BB10FE /* Project object */;
}

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>