Open runzedong opened 5 years ago
ok. so I downgrade the artifact to use OpenCV 3.4.3
, and this error is dismissed and no crash again. But I'd like to remain it open and curious about it's not compatible with 4.0.1
.
It should still work without OpenCL, but let me check this out here.
BTW, would you have an updated version of FacePreview? If you do, please send a pull request! Thanks
Just give a bit update. I checked out the latest version with 64-bit builds and it works as expected. So I will close this issue. Updated gradle is below:
implementation 'org.bytedeco:javacv:1.4.4'
implementation 'org.bytedeco.javacpp-presets:opencv:4.0.1-1.4.4:android-arm64'
implementation 'org.bytedeco.javacpp-presets:ffmpeg:4.1-1.4.4:android-arm64'
I was able to reproduce something like that in the emulator. It looks like the C++ runtime crashes on the exception thrown when checking for OpenCL, something that happens only on 32-bit ARM for some reason as explained at https://github.com/android-ndk/ndk/issues/785. In any case, thanks for reporting! Now, we'll need to fix this...
Overview
I'm doing face detection on Android side. The application is supposed to read from a video file and do face detection on frames.
Device
Artifacts Used
Questions
I'm using
FFmpegFrameGrabber
to extract frames, and convert frames to OpenCV mat withOpenCVFrameConverter
.But the app will crash at the last step when detecting faces on each mat by calling
detectMultiScale
method.It complains
OpenCL function is not available
when callingopencl_check_fn
fromopencv-4.0.1/modules/core/src/opencl/runtime/opencl_core.cpp:326
.home/travis/build/javacpp-presets
. But I don't know where this dir come from? Travis CI?org.opencv.objdetect.CascadeClassifier
. So it feels like the error is JavaCV specific? Link of the sample is hereError log
The error log posted at below:
Sample Code