Android Question Face Detection Failed with CameraExClass

frederic

Member
Licensed User
Longtime User
Hello,

My application don't want to run with the front camera using the classic CameraExClass Library.
It works on my smartphone Galaxy GT19300, but now I have buy a Tablette android, this is the Thomson Teo QD10C.
What is the difference?
The message of the tablette is : "FACE DETECTION FAILED".
What is possible to do?
Thanks in advance.
Best regards
frédéric
 

frederic

Member
Licensed User
Longtime User
there is the simply code, they use CameraExClass:


B4X:
Sub Camera1_Ready (Success As Boolean)
    If Success Then
        camEx.SetJpegQuality(90)
        camEx.SetPreviewSize(640, 480)
        camEx.SetFaceDetectionListener
        camEx.CommitParameters
        camEx.StartFaceDetection
        camEx.StartPreview

    Else
        ToastMessageShow("Cannot open camera.", True)
    End If

End Sub

frédéric
 
Upvote 0

frederic

Member
Licensed User
Longtime User
here another error, to better understand:

*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
My ip: 192.168.1.11
** Activity (main) Resume **
** Service (starter) Start **
findCamera
null
2
facing: 0, 1
facing: 1, 1
findCamera
0
2
facing: 0, 1
facing: 1, 1
cameraexclass_startfacedetection (java line: 800)
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4j.object.JavaObject.RunMethod(JavaObject.java:131)
at sf.VoicePub.cameraexclass._startfacedetection(cameraexclass.java:800)
at sf.VoicePub.main._camera1_ready(main.java:818)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:1058)
at anywheresoftware.b4a.keywords.Common.CallSubNew2(Common.java:1013)
at sf.VoicePub.cameraexclass._camera_ready(cameraexclass.java:117)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:166)
at anywheresoftware.b4a.objects.CameraW$2$1.run(CameraW.java:139)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.IllegalArgumentException: invalid face detection type=0
at android.hardware.Camera._startFaceDetection(Native Method)
at android.hardware.Camera.startFaceDetection(Camera.java:1466)
... 25 more

thank you
frédéric
 
Upvote 0
Top