Showing
239 changed files
with
545 additions
and
19 deletions
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type

22.8 KB
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
1 | +// | ||
2 | +// BDFaceAdjustParamsCell.h | ||
3 | +// FaceSDKSample_IOS | ||
4 | +// | ||
5 | +// Created by Zhang,Jian(MBD) on 2020/12/1. | ||
6 | +// Copyright © 2020 Baidu. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import "BDFaceAdjustParamsRootCell.h" | ||
10 | +#import "BDFaceAdjustParamsItem.h" | ||
11 | +NS_ASSUME_NONNULL_BEGIN | ||
12 | + | ||
13 | +typedef void(^BDFaceAdjustParamsCellDidChangedValue)(BDFaceAdjustParamsItemType, float); | ||
14 | + | ||
15 | +@interface BDFaceAdjustParamsCell : BDFaceAdjustParamsRootCell | ||
16 | + | ||
17 | +@property(nonatomic, copy) BDFaceAdjustParamsCellDidChangedValue didFinishAdjustParams; | ||
18 | +@property(nonatomic, assign) BOOL isSameConfig; | ||
19 | + | ||
20 | +@end | ||
21 | + | ||
22 | +NS_ASSUME_NONNULL_END |
@@ -73,6 +73,8 @@ extern NSString *const BDFaceAdjustParamsControllerConfigIsSameKey; | @@ -73,6 +73,8 @@ extern NSString *const BDFaceAdjustParamsControllerConfigIsSameKey; | ||
73 | extern UInt32 const BDFaceAdjustParamsRecoverActiveTextColor; | 73 | extern UInt32 const BDFaceAdjustParamsRecoverActiveTextColor; |
74 | extern UInt32 const BDFaceAdjustParamsRecoverUnactiveTextColor; | 74 | extern UInt32 const BDFaceAdjustParamsRecoverUnactiveTextColor; |
75 | 75 | ||
76 | +extern NSString *const BDFaceAdjustParamsRecoverActiveTextColorNew; | ||
77 | +extern NSString *const BDFaceAdjustParamsRecoverUnactiveTextColorNew; | ||
76 | 78 | ||
77 | /** | 79 | /** |
78 | @class: BDFaceAdjustParamsConstants | 80 | @class: BDFaceAdjustParamsConstants |
1 | +// | ||
2 | +// BDFaceAdjustParamsController.h | ||
3 | +// FaceSDKSample_IOS | ||
4 | +// | ||
5 | +// Created by Zhang,Jian(MBD) on 2020/12/1. | ||
6 | +// Copyright © 2020 Baidu. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import "BDFaceAdjustParamsRootController.h" | ||
10 | +#import "BDFaceAdjustParamsConstants.h" | ||
11 | +@class BDFaceAdjustParams; | ||
12 | + | ||
13 | + | ||
14 | +NS_ASSUME_NONNULL_BEGIN | ||
15 | + | ||
16 | +/** | ||
17 | + @class: BDFaceAdjustParamsController | ||
18 | + @description 调节参数页面 | ||
19 | + */ | ||
20 | +@interface BDFaceAdjustParamsController : BDFaceAdjustParamsRootController | ||
21 | + | ||
22 | +- (instancetype)initWithConfig:(BDFaceAdjustParams *)config; | ||
23 | + | ||
24 | +@end | ||
25 | + | ||
26 | +NS_ASSUME_NONNULL_END |
1 | +// | ||
2 | +// BDFaceAdjustParamsFileManager.h | ||
3 | +// FaceSDKSample_IOS | ||
4 | +// | ||
5 | +// Created by Zhang,Jian(MBD) on 2020/12/1. | ||
6 | +// Copyright © 2020 Baidu. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import <Foundation/Foundation.h> | ||
10 | +#import "BDFaceAdjustParamsConstants.h" | ||
11 | +@class BDFaceAdjustParams; | ||
12 | + | ||
13 | +NS_ASSUME_NONNULL_BEGIN | ||
14 | + | ||
15 | +/** | ||
16 | +@class: BDFaceAdjustParamsFileManager | ||
17 | +@description数据管理类 | ||
18 | + */ | ||
19 | +@interface BDFaceAdjustParamsFileManager : NSObject | ||
20 | + | ||
21 | +@property(nonatomic, strong, readonly) BDFaceAdjustParams *normalConfig; /**<正常参数配置*/ | ||
22 | +@property(nonatomic, strong, readonly) BDFaceAdjustParams *looseConfig; /**<宽松参数配置*/ | ||
23 | +@property(nonatomic, strong, readonly) BDFaceAdjustParams *strictConfig; /**<严格参数配置*/ | ||
24 | + | ||
25 | +@property(nonatomic, strong, readonly) BDFaceAdjustParams *customConfig; /**<自定义配置*/ | ||
26 | +@property(nonatomic, assign) BDFaceSelectType selectType; | ||
27 | + | ||
28 | ++ (instancetype)sharedInstance; | ||
29 | + | ||
30 | +/// 读取自定义配置 | ||
31 | +- (BDFaceAdjustParams *)readCustomCongfig; | ||
32 | + | ||
33 | +/// 储存自定义配置 | ||
34 | +- (void)saveToCustomConfigFile:(BDFaceAdjustParams *)config; | ||
35 | + | ||
36 | +/// 读取缓存的选择 | ||
37 | ++ (BDFaceSelectType)readCacheSelect; | ||
38 | + | ||
39 | +/// 保存用户的选择 | ||
40 | +- (void)saveUserSelection:(BDFaceSelectType)select; | ||
41 | + | ||
42 | +/// 跟进select 选择config | ||
43 | +- (BDFaceAdjustParams *)configBySelection:(BDFaceSelectType)type; | ||
44 | + | ||
45 | ++ (NSString *)currentSelectionText; | ||
46 | + | ||
47 | + | ||
48 | + | ||
49 | +@end | ||
50 | + | ||
51 | +NS_ASSUME_NONNULL_END |
1 | +// | ||
2 | +// BDFaceAdjustParamsItem.h | ||
3 | +// FaceSDKSample_IOS | ||
4 | +// | ||
5 | +// Created by Zhang,Jian(MBD) on 2020/12/3. | ||
6 | +// Copyright © 2020 Baidu. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import <Foundation/Foundation.h> | ||
10 | + | ||
11 | +NS_ASSUME_NONNULL_BEGIN | ||
12 | + | ||
13 | +typedef NS_ENUM(NSUInteger, BDFaceAdjustParamsContentType) { | ||
14 | + BDFaceAdjustParamsContentTypeNormal = 0, // 可以修改的值 | ||
15 | + BDFaceAdjustParamsContentTypeRecoverToNormal = 1 // 恢复默认一栏 | ||
16 | +}; | ||
17 | + | ||
18 | +typedef NS_ENUM(NSUInteger, BDFaceAdjustParamsItemType) { | ||
19 | + BDFaceAdjustParamsTypeMinLightIntensity = 1, /**<最小光照值 */ | ||
20 | + BDFaceAdjustParamsTypeMaxLightIntensity = 2,/**<最大光照值 */ | ||
21 | + BDFaceAdjustParamsTypeAmbiguity = 3,/**<模糊度 */ | ||
22 | + | ||
23 | + BDFaceAdjustParamsTypeLeftEyeOcclusion = 4,/**<左眼遮挡阈值 */ | ||
24 | + BDFaceAdjustParamsTypeRightEyeOcclusion = 5,/**< 右眼遮挡阈值 */ | ||
25 | + BDFaceAdjustParamsTypeNoseOcclusion = 6,/**<鼻子遮挡阈值 */ | ||
26 | + BDFaceAdjustParamsTypeMouthOcclusion = 7,/**<嘴巴遮挡阈值 */ | ||
27 | + BDFaceAdjustParamsTypeLeftFaceOcclusion = 8,/**<左脸遮挡阈值 */ | ||
28 | + BDFaceAdjustParamsTypeRightFaceOcclusion = 9,/**< 右脸遮挡阈值 */ | ||
29 | + BDFaceAdjustParamsTypeLowerJawOcclusion = 10,/**<下巴遮挡阈值 */ | ||
30 | + | ||
31 | + BDFaceAdjustParamsTypeUpAndDownAngle = 11,/**< 俯仰角 */ | ||
32 | + BDFaceAdjustParamsTypeLeftAndRightAngle = 12,/**< 左右角*/ | ||
33 | + BDFaceAdjustParamsTypeSpinAngle = 13/**<旋转角 */ | ||
34 | +}; | ||
35 | + | ||
36 | +@interface BDFaceAdjustParamsItem : NSObject | ||
37 | + | ||
38 | +@property(nonatomic, copy) NSString *itemTitle; | ||
39 | +@property(nonatomic, assign) float currentValue; | ||
40 | +@property(nonatomic, assign) float maxValue; | ||
41 | +@property(nonatomic, assign) float minValue; | ||
42 | +@property(nonatomic, assign) float interval; | ||
43 | +@property(nonatomic, assign) BDFaceAdjustParamsItemType configDetailType; | ||
44 | +@property(nonatomic, assign) BDFaceAdjustParamsContentType contentType; /**<Item内容类型,0为默认,可以调的参数,1为恢复默认*/ | ||
45 | + | ||
46 | +@end | ||
47 | + | ||
48 | +NS_ASSUME_NONNULL_END |
1 | +// | ||
2 | +// BDFaceAdjustParamsModel.h | ||
3 | +// FaceSDKSample_IOS | ||
4 | +// | ||
5 | +// Created by Zhang,Jian(MBD) on 2020/12/3. | ||
6 | +// Copyright © 2020 Baidu. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import <Foundation/Foundation.h> | ||
10 | +#import "BDFaceAdjustParams.h" | ||
11 | +#import "BDFaceAdjustParamsConstants.h" | ||
12 | + | ||
13 | +NS_ASSUME_NONNULL_BEGIN | ||
14 | + | ||
15 | +@interface BDFaceAdjustParamsModel : NSObject | ||
16 | + | ||
17 | +/// 加载数据 | ||
18 | ++ (NSMutableArray *)loadItemsArray:(BDFaceAdjustParams *)config | ||
19 | + recorverText:(NSString *)text | ||
20 | + selectType:(BDFaceSelectType)type; | ||
21 | + | ||
22 | +/// 根据类型,获取字符串 | ||
23 | ++ (NSString *)getSelectTypeString:(BDFaceSelectType)type; | ||
24 | + | ||
25 | +@end | ||
26 | + | ||
27 | +NS_ASSUME_NONNULL_END |
1 | +// | ||
2 | +// BDFaceAdjustParamsRootCell.h | ||
3 | +// FaceSDKSample_IOS | ||
4 | +// | ||
5 | +// Created by Zhang,Jian(MBD) on 2020/12/1. | ||
6 | +// Copyright © 2020 Baidu. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import <UIKit/UIKit.h> | ||
10 | + | ||
11 | +NS_ASSUME_NONNULL_BEGIN | ||
12 | + | ||
13 | +@interface BDFaceAdjustParamsRootCell : UITableViewCell | ||
14 | + | ||
15 | +@property(nonatomic, strong) NSObject *data; | ||
16 | +@property(nonatomic, copy) NSIndexPath *indexPath; | ||
17 | + | ||
18 | + | ||
19 | +// 设置cell 视图,这里data已不为空,可以使用,必须重写 | ||
20 | +- (void)cellFinishLoad:(NSInteger)rowsInSection; | ||
21 | + | ||
22 | ++ (CGFloat)HeightOfFaceAdjustCell; | ||
23 | + | ||
24 | +// 分割线颜色 | ||
25 | ++ (UIColor *)seperatorColor; | ||
26 | + | ||
27 | +/// layoutsubview 方法中才能使用 | ||
28 | +- (void)setConerRadius:(float)cornerRadius | ||
29 | + borderWidth:(CGFloat)borderWidth | ||
30 | + borderColor:(nullable CGColorRef)borderColor; | ||
31 | + | ||
32 | + | ||
33 | +@end | ||
34 | + | ||
35 | +NS_ASSUME_NONNULL_END |
1 | +// | ||
2 | +// BDFaceAdjustParamsRootController.h | ||
3 | +// FaceSDKSample_IOS | ||
4 | +// | ||
5 | +// Created by Zhang,Jian(MBD) on 2020/12/1. | ||
6 | +// Copyright © 2020 Baidu. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import <UIKit/UIKit.h> | ||
10 | + | ||
11 | +NS_ASSUME_NONNULL_BEGIN | ||
12 | + | ||
13 | +/** | ||
14 | +@class: BDFaceAdjustParamsRootController | ||
15 | +@description UITableViewDelegate协议方法需要子类实现,dataSource不需要子类实现 | ||
16 | + */ | ||
17 | +@interface BDFaceAdjustParamsRootController : UIViewController <UITableViewDelegate> | ||
18 | + | ||
19 | +@property(nonatomic, strong, readonly) UILabel *titleLabel; | ||
20 | +@property(nonatomic, strong) UITableView *tableView; | ||
21 | +@property(nonatomic, strong) UIView *titleView; | ||
22 | + | ||
23 | +#pragma mark 需要在子类ViewDidLoad里调用该方法 | ||
24 | +- (void)loadTableWithCellClass:(Class)cellClass | ||
25 | + reuseLabel:(NSString *)reuseLabel | ||
26 | + dataSourceArray:(NSMutableArray *)array; | ||
27 | + | ||
28 | +// controller 设置cell内容,第一次加载完成 | ||
29 | +- (void)updateCellContent:(UITableViewCell *)cell indexPath:(NSIndexPath *)indexPath; | ||
30 | + | ||
31 | +/// 定义表格样式,默认plain,子类可以覆盖 | ||
32 | +- (UITableViewStyle)customTableViewStyle; | ||
33 | + | ||
34 | +/// 返回操作,子类需要覆盖 | ||
35 | +- (void)goBack; | ||
36 | + | ||
37 | +@end | ||
38 | + | ||
39 | +NS_ASSUME_NONNULL_END |
@@ -14,6 +14,9 @@ NS_ASSUME_NONNULL_BEGIN | @@ -14,6 +14,9 @@ NS_ASSUME_NONNULL_BEGIN | ||
14 | 14 | ||
15 | @interface BDFaceAdjustParamsTool : NSObject | 15 | @interface BDFaceAdjustParamsTool : NSObject |
16 | 16 | ||
17 | +/// 设置默认config | ||
18 | ++ (void)setDefaultConfig; | ||
19 | + | ||
17 | /// 改变config配置 | 20 | /// 改变config配置 |
18 | + (void)changeConfig:(BDFaceAdjustParams *)params; | 21 | + (void)changeConfig:(BDFaceAdjustParams *)params; |
19 | 22 |
1 | // | 1 | // |
2 | // BDFaceAgreementViewController.h | 2 | // BDFaceAgreementViewController.h |
3 | -// IDLFaceSDKDemoOC | 3 | +// FaceSDKSample_IOS |
4 | // | 4 | // |
5 | // Created by 孙明喆 on 2020/3/12. | 5 | // Created by 孙明喆 on 2020/3/12. |
6 | // Copyright © 2020 Baidu. All rights reserved. | 6 | // Copyright © 2020 Baidu. All rights reserved. |
1 | +// | ||
2 | +// BDFaceAlertViewController.h | ||
3 | +// FaceSDKSample_IOS | ||
4 | +// | ||
5 | +// Created by Zhang,Jian(MBD) on 2020/12/7. | ||
6 | +// Copyright © 2020 Baidu. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import <UIKit/UIKit.h> | ||
10 | + | ||
11 | +NS_ASSUME_NONNULL_BEGIN | ||
12 | + | ||
13 | +/** | ||
14 | +@class:BDFaceAlertController | ||
15 | +@description: 自定义AlertController,实现了右边是Bold字体的样式。 | ||
16 | + */ | ||
17 | +@interface BDFaceAlertController : UIAlertController | ||
18 | + | ||
19 | +- (void)changeTextToBold:(NSString *)string; | ||
20 | +- (void)changeTextToLight:(NSArray *)array; | ||
21 | + | ||
22 | +@end | ||
23 | + | ||
24 | +NS_ASSUME_NONNULL_END |
1 | // | 1 | // |
2 | -// BDSettingViewController.h | ||
3 | -// IDLFaceSDKDemoOC | 2 | +// BDFaceInterfaceSelectViewController.h |
3 | +// FaceSDKSample_IOS | ||
4 | // | 4 | // |
5 | -// Created by Zhang,Jian(MBD) on 2021/6/2. | 5 | +// Created by 之哥 on 2021/8/19. |
6 | // Copyright © 2021 Baidu. All rights reserved. | 6 | // Copyright © 2021 Baidu. All rights reserved. |
7 | // | 7 | // |
8 | 8 | ||
@@ -10,8 +10,9 @@ | @@ -10,8 +10,9 @@ | ||
10 | 10 | ||
11 | NS_ASSUME_NONNULL_BEGIN | 11 | NS_ASSUME_NONNULL_BEGIN |
12 | 12 | ||
13 | -@interface BDSettingViewController : UIViewController | 13 | +@interface BDFaceInterfaceSelectViewController : UIViewController |
14 | 14 | ||
15 | +@property (nonatomic ,assign)NSInteger selectType; | ||
15 | 16 | ||
16 | @end | 17 | @end |
17 | 18 |
1 | +// | ||
2 | +// CDFaceLiveItemDetailsViewController.h | ||
3 | +// FaceSDKSample_IOS | ||
4 | +// | ||
5 | +// Created by 之哥 on 2021/8/20. | ||
6 | +// Copyright © 2021 Baidu. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import <UIKit/UIKit.h> | ||
10 | +#import <BDFaceBaseKit/BDFaceBaseKit.h> | ||
11 | + | ||
12 | +NS_ASSUME_NONNULL_BEGIN | ||
13 | + | ||
14 | +@interface BDFaceLiveItemDetailsViewController : UIViewController | ||
15 | + | ||
16 | +@property(nonatomic, assign) int livenessNum; | ||
17 | + | ||
18 | +@property(nonatomic, assign) BDFaceLiveSelectType selectType; //方案类型 | ||
19 | +@end | ||
20 | + | ||
21 | +NS_ASSUME_NONNULL_END |
1 | +// | ||
2 | +// BDFaceLiveSelectItemViewController.h | ||
3 | +// FaceSDKSample_IOS | ||
4 | +// | ||
5 | +// Created by 之哥 on 2021/8/20. | ||
6 | +// Copyright © 2021 Baidu. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import <UIKit/UIKit.h> | ||
10 | +#import <BDFaceBaseKit/BDFaceBaseKit.h> | ||
11 | + | ||
12 | +NS_ASSUME_NONNULL_BEGIN | ||
13 | + | ||
14 | +@interface BDFaceLiveSelectItemViewController : UIViewController | ||
15 | + | ||
16 | +@property(nonatomic, assign) int livenessNum; //动作列表内动作个数 | ||
17 | + | ||
18 | +@property(nonatomic, assign) BDFaceLiveSelectType selectType; //方案类型 | ||
19 | + | ||
20 | +@end | ||
21 | + | ||
22 | +NS_ASSUME_NONNULL_END |
1 | +// | ||
2 | +// BDFaceLiveSelectViewController.h | ||
3 | +// FaceSDKSample_IOS | ||
4 | +// | ||
5 | +// Created by 之哥 on 2021/8/19. | ||
6 | +// Copyright © 2021 Baidu. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import <UIKit/UIKit.h> | ||
10 | + | ||
11 | +NS_ASSUME_NONNULL_BEGIN | ||
12 | + | ||
13 | +@interface BDFaceLiveSelectViewController : UIViewController | ||
14 | + | ||
15 | +@property (nonatomic ,assign)NSInteger selectType; | ||
16 | + | ||
17 | +@end | ||
18 | + | ||
19 | +NS_ASSUME_NONNULL_END |
1 | +// | ||
2 | +// LivingConfigViewController.h | ||
3 | +// FaceSDKSample_IOS | ||
4 | +// | ||
5 | +// Created by 阿凡树 on 2017/5/23. | ||
6 | +// Copyright © 2017年 Baidu. All rights reserved. | ||
7 | +// | ||
8 | +// 此类为了方便选择活体检测命令选项 | ||
9 | +// | ||
10 | + | ||
11 | + | ||
12 | +#import <UIKit/UIKit.h> | ||
13 | + | ||
14 | +@interface BDFaceLivingConfigViewController : UIViewController | ||
15 | + | ||
16 | +@end |
1 | +// | ||
2 | +// BDFaceSelectConfigCell.h | ||
3 | +// FaceSDKSample_IOS | ||
4 | +// | ||
5 | +// Created by Zhang,Jian(MBD) on 2020/12/1. | ||
6 | +// Copyright © 2020 Baidu. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import "BDFaceAdjustParamsRootCell.h" | ||
10 | +#import "BDFaceSelectRadio.h" | ||
11 | +#import "BDFaceSelectItem.h" | ||
12 | +#import "BDFaceAdjustParams.h" | ||
13 | + | ||
14 | +NS_ASSUME_NONNULL_BEGIN | ||
15 | + | ||
16 | + | ||
17 | +typedef void(^BDFaceUserWillAdjustParams)(BDFaceSelectType); | ||
18 | + | ||
19 | +extern float const BDFaceSelectConfigCellHeight; | ||
20 | + | ||
21 | +@interface BDFaceSelectConfigCell : BDFaceAdjustParamsRootCell | ||
22 | + | ||
23 | +@property(nonatomic, strong) BDFaceSelectRadio *radio; | ||
24 | +@property(nonatomic, copy) BDFaceUserWillAdjustParams adjustConfigAction; | ||
25 | + | ||
26 | +- (void)showSettingButton:(BOOL)show; | ||
27 | + | ||
28 | +@end | ||
29 | + | ||
30 | +NS_ASSUME_NONNULL_END |
1 | +// | ||
2 | +// BDFaceSelectConfigController.h | ||
3 | +// FaceSDKSample_IOS | ||
4 | +// | ||
5 | +// Created by Zhang,Jian(MBD) on 2020/12/1. | ||
6 | +// Copyright © 2020 Baidu. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import "BDFaceAdjustParamsRootController.h" | ||
10 | +#import "BDFaceAdjustParamsConstants.h" | ||
11 | + | ||
12 | +NS_ASSUME_NONNULL_BEGIN | ||
13 | + | ||
14 | +/** | ||
15 | + @class: BDFaceSelectConfigController | ||
16 | + @description 选择配置界面 | ||
17 | + */ | ||
18 | +@interface BDFaceSelectConfigController : BDFaceAdjustParamsRootController | ||
19 | + | ||
20 | + | ||
21 | + | ||
22 | +@end | ||
23 | + | ||
24 | +NS_ASSUME_NONNULL_END |
1 | +// | ||
2 | +// BDFaceSelectConfigModel.h | ||
3 | +// FaceSDKSample_IOS | ||
4 | +// | ||
5 | +// Created by Zhang,Jian(MBD) on 2020/12/7. | ||
6 | +// Copyright © 2020 Baidu. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import <Foundation/Foundation.h> | ||
10 | + | ||
11 | +NS_ASSUME_NONNULL_BEGIN | ||
12 | + | ||
13 | +@interface BDFaceSelectConfigModel : NSObject | ||
14 | + | ||
15 | ++ (NSMutableArray *)loadItems; | ||
16 | + | ||
17 | +@end | ||
18 | + | ||
19 | +NS_ASSUME_NONNULL_END |
1 | +// | ||
2 | +// BDFaceSelectItem.h | ||
3 | +// FaceSDKSample_IOS | ||
4 | +// | ||
5 | +// Created by Zhang,Jian(MBD) on 2020/12/2. | ||
6 | +// Copyright © 2020 Baidu. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import <Foundation/Foundation.h> | ||
10 | +#import "BDFaceAdjustParams.h" | ||
11 | +#import "BDFaceAdjustParamsConstants.h" | ||
12 | + | ||
13 | +NS_ASSUME_NONNULL_BEGIN | ||
14 | + | ||
15 | + | ||
16 | +@interface BDFaceSelectItem : NSObject | ||
17 | + | ||
18 | +@property(nonatomic, copy) NSString *itemTitle; | ||
19 | +@property(nonatomic, assign) BDFaceSelectType itemType; | ||
20 | +@property(nonatomic, strong) BDFaceAdjustParams *adjustParams; | ||
21 | + | ||
22 | +@end | ||
23 | + | ||
24 | +NS_ASSUME_NONNULL_END |
1 | +// | ||
2 | +// BDFaceSelectRadio.h | ||
3 | +// FaceSDKSample_IOS | ||
4 | +// | ||
5 | +// Created by Zhang,Jian(MBD) on 2020/12/2. | ||
6 | +// Copyright © 2020 Baidu. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import <UIKit/UIKit.h> | ||
10 | + | ||
11 | +NS_ASSUME_NONNULL_BEGIN | ||
12 | + | ||
13 | +typedef void(^BDFaceSelectRadioState)(NSInteger index, BOOL selected); | ||
14 | + | ||
15 | +@interface BDFaceSelectRadio : UIButton | ||
16 | + | ||
17 | +@property(nonatomic, copy) BDFaceSelectRadioState radioTaped; | ||
18 | + | ||
19 | +/// 指定初始化方法 | ||
20 | ++ (instancetype)buttonWithType:(UIButtonType)buttonType selected:(BOOL)selected; | ||
21 | + | ||
22 | +// 改变按钮状态 | ||
23 | +- (void)changeRadioState:(BOOL)state; | ||
24 | + | ||
25 | +// 初始化按钮状态 | ||
26 | +- (void)initRadioState:(BOOL)state; | ||
27 | + | ||
28 | +@end | ||
29 | + | ||
30 | + | ||
31 | + | ||
32 | + | ||
33 | +NS_ASSUME_NONNULL_END |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | 14 | ||
15 | // (您申请的应用名称(appname)+「-face-ios」后缀,如申请的应用名称(appname)为test123,则此处填写test123-face-ios) | 15 | // (您申请的应用名称(appname)+「-face-ios」后缀,如申请的应用名称(appname)为test123,则此处填写test123-face-ios) |
16 | // 在后台 -> 产品服务 -> 人脸识别 -> 客户端SDK管理查看,如果没有的话就新建一个 | 16 | // 在后台 -> 产品服务 -> 人脸识别 -> 客户端SDK管理查看,如果没有的话就新建一个 |
17 | -#define FACE_LICENSE_ID @"hhdoctor-face-ios" | 17 | +#define FACE_LICENSE_ID @"hhdoctor1-face-ios" |
18 | 18 | ||
19 | // OCR license文件名 | 19 | // OCR license文件名 |
20 | #define FACE_API_ORC_KEY @"aip" | 20 | #define FACE_API_ORC_KEY @"aip" |
@@ -11,16 +11,16 @@ | @@ -11,16 +11,16 @@ | ||
11 | NS_ASSUME_NONNULL_BEGIN | 11 | NS_ASSUME_NONNULL_BEGIN |
12 | 12 | ||
13 | typedef NS_ENUM(NSUInteger, HHAuthStatus) { | 13 | typedef NS_ENUM(NSUInteger, HHAuthStatus) { |
14 | - HHAuthStatusSuccess, | ||
15 | - HHAuthStatusIdentifyFail, | ||
16 | - HHAuthStatusAuthenFail, | 14 | + HHAuthStatusSuccess = 0, |
15 | + HHAuthStatusIdentifyFail = 1, | ||
16 | + HHAuthStatusAuthenFail = 2, | ||
17 | }; | 17 | }; |
18 | 18 | ||
19 | @interface HHDoctorFace : NSObject | 19 | @interface HHDoctorFace : NSObject |
20 | 20 | ||
21 | @property (strong, nonatomic) BDFaceLogicService *logicService; | 21 | @property (strong, nonatomic) BDFaceLogicService *logicService; |
22 | @property (copy, nonatomic) NSString *accessToken; | 22 | @property (copy, nonatomic) NSString *accessToken; |
23 | -@property (strong, nonatomic) UIViewController *fromeVC; | 23 | +@property (weak, nonatomic) UIViewController *fromeVC; |
24 | 24 | ||
25 | + (instancetype)sharedInstance; | 25 | + (instancetype)sharedInstance; |
26 | 26 | ||
@@ -28,6 +28,7 @@ typedef NS_ENUM(NSUInteger, HHAuthStatus) { | @@ -28,6 +28,7 @@ typedef NS_ENUM(NSUInteger, HHAuthStatus) { | ||
28 | 28 | ||
29 | + (void)startCheckFace: (UIViewController *)vc dict:(NSDictionary *)dict response:(void(^)(HHAuthStatus code, NSString *errorMsg))response; | 29 | + (void)startCheckFace: (UIViewController *)vc dict:(NSDictionary *)dict response:(void(^)(HHAuthStatus code, NSString *errorMsg))response; |
30 | 30 | ||
31 | ++ (void)unInitSDK; | ||
31 | @end | 32 | @end |
32 | 33 | ||
33 | NS_ASSUME_NONNULL_END | 34 | NS_ASSUME_NONNULL_END |
@@ -11,23 +11,40 @@ | @@ -11,23 +11,40 @@ | ||
11 | #endif | 11 | #endif |
12 | 12 | ||
13 | #import "BDConfigFileParser.h" | 13 | #import "BDConfigFileParser.h" |
14 | -#import "BDSettingViewController.h" | ||
15 | #import "BDConfigDataService.h" | 14 | #import "BDConfigDataService.h" |
16 | -#import "BDFaceAdjustParams.h" | ||
17 | -#import "BDFaceAdjustParamsConstants.h" | ||
18 | -#import "BDFaceAdjustParamsTool.h" | ||
19 | #import "FaceParameterConfig.h" | 15 | #import "FaceParameterConfig.h" |
20 | #import "BDFaceVideoCaptureDevice.h" | 16 | #import "BDFaceVideoCaptureDevice.h" |
21 | #import "Reachability.h" | 17 | #import "Reachability.h" |
22 | #import "BDFaceSDKObjectChecker.h" | 18 | #import "BDFaceSDKObjectChecker.h" |
23 | #import "BDUIConstant.h" | 19 | #import "BDUIConstant.h" |
24 | #import "VerifyRegexTool.h" | 20 | #import "VerifyRegexTool.h" |
21 | +#import "BDFaceAdjustParamsController.h" | ||
22 | +#import "BDFaceAdjustParamsRootController.h" | ||
23 | +#import "BDFaceAlertController.h" | ||
24 | +#import "BDFaceInterfaceSelectViewController.h" | ||
25 | +#import "BDFaceLiveItemDetailsViewController.h" | ||
26 | +#import "BDFaceLiveSelectItemViewController.h" | ||
27 | +#import "BDFaceLiveSelectViewController.h" | ||
28 | +#import "BDFaceSelectConfigController.h" | ||
29 | +#import "BDFaceAdjustParamsTool.h" | ||
30 | +#import "BDFaceAdjustParams.h" | ||
31 | +#import "BDFaceAdjustParamsConstants.h" | ||
32 | +#import "BDFaceAdjustParamsFileManager.h" | ||
33 | +#import "BDFaceAdjustParamsItem.h" | ||
34 | +#import "BDFaceAdjustParamsModel.h" | ||
35 | +#import "BDFaceSelectConfigModel.h" | ||
36 | +#import "BDFaceSelectItem.h" | ||
37 | +#import "BDFaceAdjustParamsCell.h" | ||
38 | +#import "BDFaceAdjustParamsRootCell.h" | ||
39 | +#import "BDFaceSelectConfigCell.h" | ||
40 | +#import "BDFaceSelectRadio.h" | ||
25 | #import "BDBaseCalculateTool.h" | 41 | #import "BDBaseCalculateTool.h" |
26 | #import "BDBaseToastView.h" | 42 | #import "BDBaseToastView.h" |
27 | #import "BDFaceAlertView.h" | 43 | #import "BDFaceAlertView.h" |
28 | #import "UIColor+BDFaceColorUtils.h" | 44 | #import "UIColor+BDFaceColorUtils.h" |
29 | #import "UIViewController+BDPresentingAnimation.h" | 45 | #import "UIViewController+BDPresentingAnimation.h" |
30 | #import "BDFaceAgreementViewController.h" | 46 | #import "BDFaceAgreementViewController.h" |
47 | +#import "BDFaceLivingConfigViewController.h" | ||
31 | #import "BDFacePoorNetworkController.h" | 48 | #import "BDFacePoorNetworkController.h" |
32 | #import "BDFaceVerificationConstant.h" | 49 | #import "BDFaceVerificationConstant.h" |
33 | #import "BDFaceVerificationController.h" | 50 | #import "BDFaceVerificationController.h" |
@@ -42,8 +42,6 @@ | @@ -42,8 +42,6 @@ | ||
42 | */ | 42 | */ |
43 | + (BOOL)isVaildIDCardNo:(NSString *)idCardNo; | 43 | + (BOOL)isVaildIDCardNo:(NSString *)idCardNo; |
44 | 44 | ||
45 | - | ||
46 | - | ||
47 | /** | 45 | /** |
48 | 判断输入框内的人名是否是有效的中文名 | 46 | 判断输入框内的人名是否是有效的中文名 |
49 | @param textField 文本输入框 | 47 | @param textField 文本输入框 |
@@ -64,4 +62,28 @@ | @@ -64,4 +62,28 @@ | ||
64 | */ | 62 | */ |
65 | + (BOOL)isVaildRealName:(NSString *)realName; | 63 | + (BOOL)isVaildRealName:(NSString *)realName; |
66 | 64 | ||
65 | +/** | ||
66 | + 港澳居民来往内陆通行证号码验证 | ||
67 | + @param strName 验证的字符串 | ||
68 | + */ | ||
69 | ++ (BOOL)isValidForGAT:(NSString *)strName; | ||
70 | + | ||
71 | +/** | ||
72 | + 外国人永久居留证 | ||
73 | + @param strName 验证字符串 | ||
74 | + */ | ||
75 | ++ (BOOL)isValidForForeignersPermit:(NSString *)strName; | ||
76 | + | ||
77 | +/** | ||
78 | + 定居国外中国公民护照 | ||
79 | + @param strName 验证字符串 | ||
80 | + */ | ||
81 | ++ (BOOL)isValidForCitizenPassport:(NSString *)strName; | ||
82 | + | ||
83 | +/** | ||
84 | + 定居港澳居民身份 | ||
85 | + @param strName 验证字符串 | ||
86 | + */ | ||
87 | ++ (BOOL)isValidForGATCard:(NSString *)strName; | ||
88 | + | ||
67 | @end | 89 | @end |
No preview for this file type
No preview for this file type
HHFaceSDK/HHSources/CollectInfo.storyboardc/8iX-m7-TNG-view-FxE-Su-Fke.nib/objects-11.0+.nib
0 → 100644
No preview for this file type
No preview for this file type
HHFaceSDK/HHSources/CollectInfo.storyboardc/BDIDInfoAutoCollectController.nib/objects-11.0+.nib
0 → 100644
No preview for this file type
HHFaceSDK/HHSources/CollectInfo.storyboardc/BDIDInfoAutoCollectController.nib/runtime.nib
0 → 100644
No preview for this file type
HHFaceSDK/HHSources/CollectInfo.storyboardc/BDIDInfoCollectController.nib/objects-11.0+.nib
0 → 100644
No preview for this file type
No preview for this file type
No preview for this file type
HHFaceSDK/HHSources/CollectInfo.storyboardc/Y6W-OH-hqX-view-5EZ-qb-Rvc.nib/objects-11.0+.nib
0 → 100644
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
1 | -{"onlineImageQuality":"NORMAL","onlineLivenessQuality":"NORMAL","version":"3.0.0","solutionType":"2","planId":"13438","faceActionNum":2,"faceLivenessType":1,"faceVerifyAction":["mouth","eye"],"livenessThreshold":0.8,"collection":2,"policeCheck":0,"policeThreshold":80,"localImageQuality":{"loose":{},"normal":{"minIllum":40,"maxIllum":220,"leftEyeOcclusion":0.8,"rightEyeOcclusion":0.8,"noseOcclusion":0.8,"mouseOcclusion":0.8,"leftContourOcclusion":0.8,"rightContourOcclusion":0.8,"chinOcclusion":0.8,"pitch":20,"yaw":18,"roll":20,"blur":0.6},"strict":{}}} | 1 | +{"onlineImageQuality":"NORMAL","onlineLivenessQuality":"NORMAL","version":"3.0.0","solutionType":"2","planId":"18602","faceActionNum":2,"faceLivenessType":1,"faceVerifyAction":["mouth","eye"],"livenessThreshold":0.8,"collection":2,"policeCheck":0,"policeThreshold":80,"localImageQuality":{"loose":{},"normal":{"minIllum":40,"maxIllum":220,"leftEyeOcclusion":0.8,"rightEyeOcclusion":0.8,"noseOcclusion":0.8,"mouseOcclusion":0.8,"leftContourOcclusion":0.8,"rightContourOcclusion":0.8,"chinOcclusion":0.8,"pitch":20,"yaw":18,"roll":20,"blur":0.6},"strict":{}}} |
No preview for this file type
HHFaceSDK/HHSources/idl-license.face-ios
100755 → 100644
1 | -0A75927447B3B8193B98ED08B55F8E51EC84CA483E8CABCE38CFD8603ED99D9CF9DCE49C43D8A01AE2CA0F2D84864744ED1DFC59008C7C8F9FB06E9D5D66189C2D17DF6795B4D4870A0888762810DD2A9DDAFB915A3CDC137BEE31800F3DCFB12DADDA9E293AE05CB2EE3891AF334086D3594C92AF1FF4E37A42182B1EB9B63C9BC27CAE8EA920E7EC0C0E0FE26AF40DBA11431F4B54DAB9579F819FC5593A7A6F16B4FB48F1AA9A9B84C53014DE8B0D5D5A8FCF4ACDED578258594FA5E27E971FA72C7244D6110ABB65405BCEE17F97FA9DA4EC3C7BE2B877B5E225B25E796E3CA6F01321D3850C2EB7B2512744690B5134186BBD53CCB3D348279681ACF00D | 1 | +3C18A6F60B301302E5C10692B99A8328BEE1CDE5493F04F7E672C0E4231B727956D25A5D292976039945D73E47E3BE541122731A2F8A3927BC747BA5FA63E1147C61F1A9C8442DFD72B3120606FCDB016547AE14B5F61BD5951973C4E1078D36E8B305A48B19A9FA5DB51E15E3A1AEDEF4246053DE0FFA765E4FB0CDDDFCFA4811741E7B699869C9F6E1FE34C0272E1EF343C64A95C99950C1DD2B6668BA30AB5CC4DFB66B833112B1666F66FAB3C06F6EEF186CFE911ACFEDB2AFDE573810C0B36181C30B6C22FE3EF1D9F3AD110E337A7A080D3F996B85250A9787190EDE09AC83E7B9F5FD2EAAA11A6E1E1E3BC14A11345B76131143B693EDDE5943F8705E |
2 | 549603A3268655193F3F69E11F9E6F328B10DE32E21CBDA2EAA2CA7B44D7DA2A348A346CDC1022E4EE42769B42625CD03763375B691397AFDF6C1A1FEB22014228A8E6162AF561FFA4694C20962637FF16BE9C84D4EF2CFC903D0187DA497FECB630210124908CEC6988826C17814F358EEE16D0E35DA79BA2A7A37244E4CF8E8043C55A09507BB26E5B3E46C299DE4AC3C408C162A26922F20548F3EDDBE0A78C45A1D95BB57A2CFC089C754AA794A4E8462A4A614C4EBCA5F3BD027A10EFCEE039B01C2DA2AAD95477218F8A3FD3EBD9BB7F8984E57E0E3FDE698FC203A96C233BE33881B1FFE3B061A0DD1DBBA3E9FB194D9976B531ED920FD601660927AA | 2 | 549603A3268655193F3F69E11F9E6F328B10DE32E21CBDA2EAA2CA7B44D7DA2A348A346CDC1022E4EE42769B42625CD03763375B691397AFDF6C1A1FEB22014228A8E6162AF561FFA4694C20962637FF16BE9C84D4EF2CFC903D0187DA497FECB630210124908CEC6988826C17814F358EEE16D0E35DA79BA2A7A37244E4CF8E8043C55A09507BB26E5B3E46C299DE4AC3C408C162A26922F20548F3EDDBE0A78C45A1D95BB57A2CFC089C754AA794A4E8462A4A614C4EBCA5F3BD027A10EFCEE039B01C2DA2AAD95477218F8A3FD3EBD9BB7F8984E57E0E3FDE698FC203A96C233BE33881B1FFE3B061A0DD1DBBA3E9FB194D9976B531ED920FD601660927AA |
HHFaceSDK/hhImages/faceShape@3x.png
deleted
100644 → 0

22.8 KB
HHFaceSDK/hhImages/icon_success@3x.png
0 → 100644

4.39 KB
HHFaceSDK/hhImages/loading@3x.png
0 → 100644

4.44 KB
HHFaceSDK/hhImages/阴影@3x.png
0 → 100644

3.29 KB
-
Please register or login to post a comment