我试图让由FaceDetector检测到的面部的欧拉角。
I'm trying to get a the Euler angle of a Face that is detected by FaceDetector.
下面是我用什么来输出logcat的:
Here is what I use to output to Logcat:
Log.v("debug", " X: " + face.pose(Face.EULER_X) + " Y: " + face.pose(Face.EULER_Y) + " Z: " + face.pose(Face.EULER_Z) );
但它总是返回0.0三种,无论什么角度面孔在。任何想法,为什么?
But it always returns 0.0 for all three, no matter what angle the face is at. Any ideas why?
是啊从API 1 FaceDetector 决不会返回一个姿势的角度。你可以看一下在源$ C $ C 的验证。
Yeah the FaceDetector from API 1 never returns a pose angle. You can look at the source code to verify.
较新的 FaceDetectionListener 从API 14会返回一个姿势角,但它是仅在设备的有限数量现在。甚至不是所有正在运行的API 14的设备可以使用它。你要叫 getMaxNumDetectedFaces()以查看设备是否支持该API。
The newer FaceDetectionListener from API 14 will return a pose angle, but it's only available on a limited number of devices right now. Not even all devices running API 14 can use it. You have to call getMaxNumDetectedFaces() to see if your device supports that API.
您可以轮流尝试使用OpenCV的。对于一对夫妇的选项 HTTP://$c$c.opencv.org /项目/ OpenCV的/维基/ OpenCV4Android 和的http:// code .google.com / P / javacv / 。根据我的经验,他们不值得冒这个险,除非你真的需要的姿态角。
You can alternately try using OpenCV. A couple options for that are http://code.opencv.org/projects/opencv/wiki/OpenCV4Android and http://code.google.com/p/javacv/. In my experience they aren't worth the hassle unless you really, really need the pose angle.
上一篇:有没有什么办法,使在code滚动条的RecyclerView?有没有什么、滚动条、办法、code
下一篇:PhoneGap的VS原生的iOS / 2014年Android开发VS、PhoneGap、iOS、Android