赞
踩
声明:由于本人水平有限,所提供的代码、dll等必然存在很多问题,仅用于学习,不适合工业级使用,请谨慎使用,如果造成损失,责任自负。
资源里面包含1个java工程SeetaFaceJavaDemo和一个c++工程SeetaFaceJNIDLL
步骤:
1.首先编译SeetaFaceJNIDLL得到SeetaFaceJNIDLL.dll(已经编译好了,可以直接用),把这个dll放到java.library.path
2.然后在SeetaFaceJavaDemo里面指定seetaface人脸识别库的3个模型文件所在路径,例如
tSeetaFace.init("D:\\SeetaFaceEngine-windows\\x64\\Release");
模型文件是指:seeta_fd_frontal_v1.0.bin,seeta_fa_v1.1.bin,seeta_fr_v1.0.bin
3.运行SeetaFaceJavaDemo里面的Test.java.main(),
指定要检测的图像路径,如 String imgPath = "e:\\img\\bnz12.bmp";
结果:
need for SeetaFaceJNIDLL.dll under java.library.path---D:\workspace\NativeDemo\bin
image size=349, 418
DetectFacesByte facenum=1
init, tDir=D:\SeetaFaceEngine-windows\x64\Release
init, tFaceModelDir last =e
init, tFaceModelDir=D:\SeetaFaceEngine-windows\x64\Release/
init, all face model exist
DetectFacesByte, 1 vWidth=349, vHeight=418
DetectFacesByte, tImgData leng=437646 , tCh = 3
DetectFacesByte, seetaface/CMSeetaFace 2
DetectFacesByte, seetaface/CMSeetaFace 3
DetectFacesByte, rgb_bmp3 new ok
native RGBA2GRAY 1......
DetectFacesByte, gray ok===
DetectFacesByte, detector.Detect
DetectFacesByte, face num:1
PointDetectLandmarks 0:(186,129)
PointDetectLandmarks 1:(224,132)
PointDetectLandmarks 2:(199,158)
PointDetectLandmarks 3:(191,169)
PointDetectLandmarks 4:(222,170)
roll_angle=-3.01
yaw_angle=20.34
pitch_angle=12.52
feat0:0.07
feat1:0.00
feat2:0.00
feat3:0.37
feat4:0.27
DetectFacesByte, done
可以做很多好玩的东东啊
欢迎改进,也分享一下啊
http://download.csdn.net/detail/wuzuyu365/9723065
无调试信息版:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。