Android App use HED with OpenCV and Deep Learning(Java)

最后都变了- 提交于 2021-01-28 21:58:46

问题



I am developing an android app to scan documents with my phone. I am using openCV and Canny edge detection and it works ok but if I try to scan an document on a background without enough contrast between the document and the background it fails. I have tried other apps in the Play Store and they are still able to scan the document with less contrast. So I was looking for ways to improve my edge detection and found this:

https://www.pyimagesearch.com/2019/03/04/holistically-nested-edge-detection-with-opencv-and-deep-learning/

But I can't figure out how to use HED in my Android Studio Java project. More precisely I can't find out how to create the custom layer cropping class for the neural network in Java. I was able to get the rest of the tutorial to work but I dont know how to create the custom layer cropping class. At the moment im am registering an empty or wrong class as cropping layer and I'm getting blank images. If any of you guys know something or can point me in the right direction I'd be very thankfull.

(edit) I did some research and apparently you have to create a class in c++ and use it in java but i can't find instructions on how to achieve this.

来源:https://stackoverflow.com/questions/65608482/android-app-use-hed-with-opencv-and-deep-learningjava

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!