Closed enaut closed 7 years ago
Same for me on a Moto Z Play running latest LineageOS 14.1 without any Google apps.
Strange, it mentions Camera2 functions, but ONS isn't using Camera2 API yet. It is possible that there is some limitation on the O.S. I use on Moto Z Play with stock firmware. Right now I am unable to test it with Lineage O.S.
I tried the samples from openCV library those all work. Also when starting it crashes only after like a second. In that second the camera image is shown and focus is doing its work so access to the camera seems to be working.
Not so different, but the samples uses the camera in another way. ONS don't use camera services from OpenCV.
I don't remember exactly but we had a collaborator that was looking into porting ONS to Camera2, but it is a very hard api. I may try to get into it once I get some free time.
Em ter, 5 de set de 2017 às 02:41, Franz Dietrich notifications@github.com escreveu:
I tried the samples from openCV library those all work.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/ctodobom/OpenNoteScanner/issues/85#issuecomment-327076428, or mute the thread https://github.com/notifications/unsubscribe-auth/AFyh0I0X1EGMrI_dRF75wmaNV1XhlFJZks5sfN7tgaJpZM4PCRpf .
when starting it crashes only after like a second. In that second the camera image is shown and focus is doing its work so access to the camera seems to be working.
same here.
Looks like this is the important part of the log, i will try to analise it on the next days. It is hard without having a device that it's failing, so, if any of you have coding skills and can help me, it will be welcome.
Best regards, Claudemir
08-25 08:21:07.195 9748 9748 D OpenNoteScannerActivity: onPreviewFrame - received image 1920x1080 focused: true imageprocessor: available
08-25 08:21:07.198 1539 9796 I mm-camera: <STATS_AF >< INFO> 1080: af_process_parse_stats: fv: 110669.484375, fv_norm: 990.596558, lens_pos: 590, cur_luma: 0.000000 Stats ID =5 Stats type: 0 aec_settled: 1 exp_index: 419 fps:16 real_gain:95.362183 scan_cnt:2 progress:25 gyro:0.000867 sadr:0.000000
08-25 08:21:07.206 9748 9748 D OpenNoteScannerActivity: sending message to ImageProcessor: previewFrame - com.todobom.opennotescanner.helpers.PreviewFrame@fccb4e9
08-25 08:21:07.206 9748 9766 D ImageProcessor: Message Received: previewFrame - com.todobom.opennotescanner.helpers.PreviewFrame@fccb4e9
08-25 08:21:07.245 9748 9766 E cv::error(): OpenCV Error: Assertion failed (_dx.type() == CV_16SC1 || _dx.type() == CV_16SC3) in void cv::Canny(cv::InputArray, cv::InputArray, cv::OutputArray, double, double, bool), file /build/master_pack-android/opencv/modules/imgproc/src/canny.cpp, line 1076
08-25 08:21:07.246 9748 9766 E org.opencv.imgproc: imgproc::Canny_11() caught cv::Exception: /build/master_pack-android/opencv/modules/imgproc/src/canny.cpp:1076: error: (-215) _dx.type() == CV_16SC1 || _dx.type() == CV_16SC3 in function void cv::Canny(cv::InputArray, cv::InputArray, cv::OutputArray, double, double, bool)
08-25 08:21:07.247 9748 9766 E AndroidRuntime: FATAL EXCEPTION: Worker Thread
08-25 08:21:07.247 9748 9766 E AndroidRuntime: Process: com.todobom.opennotescanner, PID: 9748
08-25 08:21:07.247 9748 9766 E AndroidRuntime: CvException [org.opencv.core.CvException: cv::Exception: /build/master_pack-android/opencv/modules/imgproc/src/canny.cpp:1076: error: (-215) _dx.type() == CV_16SC1 || _dx.type() == CV_16SC3 in function void cv::Canny(cv::InputArray, cv::InputArray, cv::OutputArray, double, double, bool)
08-25 08:21:07.247 9748 9766 E AndroidRuntime: ]
08-25 08:21:07.247 9748 9766 E AndroidRuntime: at org.opencv.imgproc.Imgproc.Canny_1(Native Method)
08-25 08:21:07.247 9748 9766 E AndroidRuntime: at org.opencv.imgproc.Imgproc.Canny(Imgproc.java:984)
08-25 08:21:07.247 9748 9766 E AndroidRuntime: at com.todobom.opennotescanner.ImageProcessor.findContours(ImageProcessor.java:497)
08-25 08:21:07.247 9748 9766 E AndroidRuntime: at com.todobom.opennotescanner.ImageProcessor.detectPreviewDocument(ImageProcessor.java:213)
08-25 08:21:07.247 9748 9766 E AndroidRuntime: at com.todobom.opennotescanner.ImageProcessor.processPreviewFrame(ImageProcessor.java:132)
08-25 08:21:07.247 9748 9766 E AndroidRuntime: at com.todobom.opennotescanner.ImageProcessor.handleMessage(ImageProcessor.java:89)
08-25 08:21:07.247 9748 9766 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
08-25 08:21:07.247 9748 9766 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154)
08-25 08:21:07.247 9748 9766 E AndroidRuntime: at android.os.HandlerThread.run(HandlerThread.java:61)
08-25 08:21:07.248 1668 3260 W ActivityManager: Force finishing activity com.todobom.opennotescanner/.OpenNoteScannerActivity
I'll happily help you! If you have any apk to try or something I'll do it. Thing is - I just don't want to setup the whole toolchain and get into java/android :(.
@enaut unfortunately you would need to install Android Studio and import the project. As this is probably some image type incompatibility on OpenCV, don't know what on the affected devices can generate an image with a format different than others. It is probably detectable and possible to do a conversion before passing it to the Canny() function.
OpenCV Error: Assertion failed (_dx.type() == CV_16SC1 || _dx.type() == CV_16SC3)
Up to the end of next week I will try to find a solution.
Best regards, Claudemir
Thank you so much! Don't feel pressed though I just wanted to let you know that I'm listening and willing to iterate some stuff.
No pressure. Now that it was narrowed up to this assertion, it should be simple once I get hands to the task! May be I will ask you to test the solution before putting it out!
Ok I didn't notice any update... but for me it is fixed... It might be that I had some conflicting package or something like that I really don't know. but it just works now.
Hey immediately on startup the app crashes with the following log on Oneplus 5 with resurrection remix and no gapps installed - any help would be apreciated:
The most relevant part might be: