-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incompatibility with Fotoapparat 2.1.2 #17
Comments
Thanks @victor5171. |
any solution for this problem? |
Can you please try FA 2.2.0? Curious why |
Hi! I'm having the same problem as @victor5171 with FA 2.2.0 and FD 1.0.0. |
This is the exception I get : |
Hey @Kim24 . I do get the same exception. Any heads up on it? |
I have a solution in the mean time, write your frame processor like this
where
In this way you essentially recreate FaceDetectorProcessor as a lambda function. |
Following @joelhaasnoot advice, here it is the Java version:
|
Hi!
I'm trying to couple FaceDetector to Fotoapparat but it looks like the newest version of it is incompatible with FaceDetector.
The following code is used to startup the camera and the detector:
val faceDetectorProcessor = FaceDetectorProcessor.with(this).listener { rectanglesView.setRectangles(it) }.build()
fotoApparat = Fotoapparat.with(this) .into(cameraView) .frameProcessor { faceDetectorProcessor.processFrame(it) } .build()
As you can see, the FrameProcessor property is now a lambda, so i've adapted the call.
But i'm receiving the following error (the application is crashing) if i run this code:
E/AndroidRuntime: FATAL EXCEPTION: pool-10-thread-1 Process: br.com.esapiens.ysos, PID: 17567 java.lang.IllegalAccessError: Field 'io.fotoapparat.preview.Frame.image' is inaccessible to class 'io.fotoapparat.facedetector.processor.FaceDetectorProcessor' (declaration of 'io.fotoapparat.facedetector.processor.FaceDetectorProcessor' appears in /data/app/br.com.esapiens.ysos-1/split_lib_dependencies_apk.apk) at io.fotoapparat.facedetector.processor.FaceDetectorProcessor.processFrame(FaceDetectorProcessor.java:37) at br.com.esapiens.ysos.camera.CameraActivity$onCreate$1.invoke(CameraActivity.kt:27) at br.com.esapiens.ysos.camera.CameraActivity$onCreate$1.invoke(CameraActivity.kt:11) at io.fotoapparat.preview.PreviewStream.dispatchFrame(PreviewStream.kt:92) at io.fotoapparat.preview.PreviewStream.access$dispatchFrame(PreviewStream.kt:14) at io.fotoapparat.preview.PreviewStream$dispatchFrameOnBackgroundThread$1.run(PreviewStream.kt:77) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818)
The text was updated successfully, but these errors were encountered: