QuickBirdEng / opencv-android

Easy way to integrate OpenCv into your Android project via Gradle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GaussianBlur Unknown Exception

MrGVSV opened this issue · comments

I was using this project without issues for CameraX image analysis, but recently ran into an issue with a new Android device. Updating from 4.1.0 to 4.5.3.0 allowed me to use this function to convert my ImageProxy to a useable Mat.

However, this update causes all my GaussianBlur calls to fail, stating:

E/org.opencv.imgproc: imgproc::GaussianBlur_12() caught unknown exception
E/AndroidRuntime: FATAL EXCEPTION: pool-11-thread-1
    Process: com.myapp, PID: 13118
    java.lang.Error: java.lang.Exception: unknown exception
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1173)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:923)
     Caused by: java.lang.Exception: unknown exception
        at org.opencv.imgproc.Imgproc.GaussianBlur_2(Native Method)
        at org.opencv.imgproc.Imgproc.GaussianBlur(Imgproc.java:1091)
        at com.myapp.process.ImageAnalyzer.analyze(ImageAnalyzer.kt:146)
        at androidx.camera.core.ImageAnalysis.lambda$setAnalyzer$2$ImageAnalysis(ImageAnalysis.java:449)
        at androidx.camera.core.-$$Lambda$ImageAnalysis$-wcArnbkVmqkAHxpJ0VOR9b2w0Q.analyze(Unknown Source:4)
        at androidx.camera.core.ImageAnalysisAbstractAnalyzer.lambda$analyzeImage$0$ImageAnalysisAbstractAnalyzer(ImageAnalysisAbstractAnalyzer.java:147)
        at androidx.camera.core.-$$Lambda$ImageAnalysisAbstractAnalyzer$8nmjUxCmaK9ClOx3NHAdwtp6S3w.run(Unknown Source:10)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
        at java.lang.Thread.run(Thread.java:923
// This worked before
Imgproc.GaussianBlur(mat, mat, Size (5.0,5.0), 2.0)

Is this an internal issue or is there something I need to change?

I am having the same issue with version 4.5.3.0. Any update on this?

commented

@MrGVSV @shantoahammed Can you try 4.5.1 or even 4.4.0 to see if you can reproduce the issue there as well.

@nasirky I apologize, but I just recently lost access to my Android equipment so I won't be able to test it :(

commented

@MrGVSV I am sorry :( . I will close this issue and if you face any issue in the future, please feel free to open a new issue.