恒大地产老总,树人大学教务处,重生轮回眼传说txt
目前只封装了人脸检测部分的类库,供大家交流学习,肯定有问题,希望大家在阅读使用的时候及时反馈,谢谢!
使用虹软技术开发完成 sdk
github:https://github.com/dayandnight2018/hrface2_0
目前包含了以下功能:
激活:
resultcode result = engineactivate.activateengine(stringappid, string appkey)
–appid和appkey在官网获取
– result是一个枚举的状态码
获取引擎:
intptr engine = enginefactory.getengineinstance(
uint mode,detectionorientpriority orientpriority, int detectfacescaleval =12)
–engine是引擎
–mode可以根据enginefactory.video或者enginefactory.image设置是图像还是视频,目前只支持图像。
– orientpriority是枚举
– detectfacescaleval可以不填
释放引擎:
bool result = enginefactory.disposeengine()
人脸个数检测:
1.初始化人脸检测器:
public facedetection(intptr hengine,bitmap image)
– hengine就是获取的引擎
–image,bitmap格式的图片,不需要提前处理图片大小,内部有处理操作
2.获取人脸数量
public int findfacenum()
返回人脸数量
人脸年龄检测:
1.初始化人脸检测器:
public facedetection(intptr hengine,bitmap image)
– hengine就是获取的引擎
–image,bitmap格式的图片,不需要提前处理图片大小,内部有处理操作
2.获取人脸年龄
public int getage()
返回人脸年龄
人脸性别检测:
1.初始化人脸检测器:
public facedetection(intptr hengine,bitmap image)
– hengine就是获取的引擎
–image,bitmap格式的图片,不需要提前处理图片大小,内部有处理操作
2.获取人脸性别
public string getgender()
返回人脸性别
人脸相似度对比:
方式一:
1.初始化人脸检测器:
public facedetection(intptr hengine,bitmap image1, bitmap image2)
– hengine就是获取的引擎
–image1,bitmap格式的图片,不需要提前处理图片大小,内部有处理操作
–image2,bitmap格式的图片,不需要提前处理图片大小,内部有处理操作
2.返回相似度
public float compare()
方式二:
返回相似度(直接对比)
public float compare(byte[] data1, byte[]data2)
–data1是人脸图像数据大小1032
–data2是人脸图像数据大小1032
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
Blazor server side 自家的一些开源的, 实用型项目的进度之 CEF客户端
.NET IoC模式依赖反转(DIP)、控制反转(Ioc)、依赖注入(DI)
vue+.netcore可支持业务代码扩展的开发框架 VOL.Vue 2.0版本发布
网友评论