
人脸比对需要比对正面照和持证照,正面照如果是竖的话,会比对不上,因此拍照保存的照片要正向保存
1、从CSDN资源下载完整demo:https://download.csdn.net/download/u011018979/14045495 2、 原理文章:https://kunnan.blog.csdn.net/article/details/112309871
从CSDN资源下载【手持证件照】完整demo源码:https://download.csdn.net/download/u011018979/14040077 1 手持证件照的裁剪算法:根据图片方向进行裁剪 2 屏幕适配:为了避免框框视图的frame超出视图范围,导致半透明黑色遮罩无法渲染maskLayer;框框视图的布局采取宽为屏幕宽度,高按照比例进行计算

在这里插入图片描述
从CSDN资源下载完整demo源码:https://download.csdn.net/download/u011018979/14040077
#import "CRMCaptureIDPic4PortraitViewController.h"
CRMCaptureIDPic4PortraitViewController *vc = [[CRMCaptureIDPic4PortraitViewController alloc] init];
vc.imageblock = ^(UIImage *image) {
self.imgView.image = image;
};
NSMutableAttributedString *xx = [[NSMutableAttributedString alloc]init];
//请调整好光线,将身份证国徽面移入框内
//请保持正脸持证于取景框内
xx.kn_addString(@"请保持正脸持证于取景框内").kn_fontColor(rgb(255,255,255)).kn_addString(@"").kn_fontColor(rgb(225,66,66)).kn_addString(@"").kn_fontColor(rgb(255,255,255));
vc.tip_attributedText = xx;
vc.kuangImgName = @"img_paishe_chizheng_red";
[self presentViewController:vc animated:YES completion:nil];
根据图片方向进行裁剪)