detecting multi color document with OpenCV4Android

谁说胖子不能爱 提交于 2019-12-07 15:33:07

问题


I am new to OpenCv with Android.I am trying to make an application which auto detects documents using OpenCv - 2.4.13 . In my app, there is a functionality of detection documents (like a Scanbot app) and then prospect it to document. So, far I am able to detect documents with single colour or documents which are clearly distinguishable from background. But the problem arises when the document is of multi-color. To clearly understand the problem , I have attached an image:

As you can see, the blue line is a detection line and it is not detecting full document. What i did so far is as below :

original image -> cvtColor -> GaussianBlur filter -> dilate it to sharpen edges -> applied watershed image segmentation algorithm -> canny edge detection with dynamic otsu's threshold -> then find largest contours -> draw contours

After some research, I came to know that the problem rely on canny edge detection. Below is the result I get after canny edge detection:

Is there any way to achieve this? Any help will be highly appreciated !! Thanks in advance

来源:https://stackoverflow.com/questions/44624760/detecting-multi-color-document-with-opencv4android

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