简体   繁体   中英

what is the best way to detect document corners in android camerax Image analysis?

I want to detect the corners of a document in real time meaning that I want to draw a bounding quad around the document similar to how most doc-scanner app do. I also want to do this by scratch. I have already read a few corner detection algorithms such as the Harris corner detector, but I have a few concerns:

  1. How do I implement this in the image analysis part of the camerax library and draw a bounding quad (not box since it can be slanted) around it in real-time meaning it is updated each frame of the camera preview?
  2. Is there a more optimized approach since for the Harris corner detection, i will have to calculate the Ix, Iy, etc. each frame, and what if there isn't any significant movement in the image and the corners are relatively where they were before?

For laying detection result over preview, the question has been asked before. See: How to draw on PreviewView?

I don't know if there is a best practice for documents scanning. Dropbox has a series of well written blog posts on the topic: https://dropbox.tech/tag-results.doc-scanner

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM