zmsoft / google-glass-api

Automatically exported from code.google.com/p/google-glass-api
0 stars 0 forks source link

Face detection API fails on Glass #282

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm calling Camera.getParameters().getMaxNumDetectedFaces() first and it 
returns a value > 0, which seems to indicate face detection is supported in 
Glass. But if I call Camera.startFaceDetection(), it throws an exception

E/AndroidRuntime(1526): java.lang.IllegalArgumentException: invalid face 
detection type=0
E/AndroidRuntime(1526):     at android.hardware.Camera._startFaceDetection(Native 
Method)
E/AndroidRuntime(1526):     at 
android.hardware.Camera.startFaceDetection(Camera.java:1286)
....

If face detection isn't supported on Glass, would be good if 
getMaxNumDetectedFaces() returned zero.

Original issue reported on code.google.com by sat...@sharpenapp.com on 6 Dec 2013 at 12:40

GoogleCodeExporter commented 9 years ago

Original comment by ala...@google.com on 9 Dec 2013 at 5:56

GoogleCodeExporter commented 9 years ago
In the meantime, you can try using the software based FaceDetector API:
  http://developer.android.com/reference/android/media/FaceDetector.html

Original comment by ala...@google.com on 9 Dec 2013 at 5:57

GoogleCodeExporter commented 9 years ago
I couldn't get face detection on the camera to work also, it doesn't through an 
exception and it returns 35 when I call getMaxNumDetectedFaces(), but it 
doesn't call back the listener

Original comment by zumy.to...@gmail.com on 30 Dec 2013 at 7:17

GoogleCodeExporter commented 9 years ago
getMaxNumDetectedFaces() returns 35 on my glass and callback gets called with 
no faces detected, i.e. faces.length is zero. The same code detects faces on 
the nexus 5 test device that I have. Any update on this issue? 

Original comment by shayan...@gmail.com on 7 Jan 2014 at 9:49

GoogleCodeExporter commented 9 years ago
I am having the same issue.

Original comment by scott.h....@gmail.com on 25 Apr 2014 at 4:28

GoogleCodeExporter commented 9 years ago
Is there any update for this? Detection would be excellent to employ!

Original comment by rantonio...@gmail.com on 9 May 2014 at 12:26

GoogleCodeExporter commented 9 years ago
To the original poster:

> java.lang.IllegalArgumentException: invalid face detection type=0

I received this error when I started face detection before I started the camera 
preview. You should:

1. Attach the listener
2. Start the preview
3. Start face detection

Everyone else:

I'm having this problem as well - I get 35 faces but none show up in the 
onFaceDetection callback. I don't have another Android device to test on but 
that would be a good next step to isolate if the Glass device is causing the 
problem or if it's code related.

Original comment by david.ku...@citrusbyte.com on 19 May 2014 at 12:41

GoogleCodeExporter commented 9 years ago
I am having the same issue.

Original comment by j796160...@gmail.com on 2 Jul 2014 at 3:23

GoogleCodeExporter commented 9 years ago
Same issue arround there. I get 35 faces but always 0 faces in onFaceDetection 
callback.

Original comment by mobile-a...@volvo.com on 2 Jul 2014 at 8:03

GoogleCodeExporter commented 9 years ago
Same here. Possible has something to do with Google's policy (below)
(Although face detection is something different then face recognition probably )

Facial recognition is explicitly disallowed in the Google Glass Policies for 
Glassware.

Section C.1.e says:

    Don't use the camera or microphone to cross-reference and immediately present personal information identifying anyone other than the user, including use cases such as facial recognition and voice print. Glassware that do this will not be approved at this time.

Reference:

https://developers.google.com/glass/policies

Original comment by mailtj...@gmail.com on 14 Nov 2014 at 2:07