0

I need to scan a special object within my android application. I thought about using OpenCV but it is scanning all objects inside the view of the camera. I only need the camera to regognize a rectangular piece of paper.

How can i do that?

My first thought was: How do barcode scanners work? They are able to regognize the barcode area and automatically take a picture when the barcode is inside a predefined area of the screen and when its sharp. I guess it must be possible to transfer that to my problem (tell me if im wrong).

So step by step:

  1. Open custom camera application
  2. Scan objects inside the view of the camera
  3. Recognize the rectangular piece of paper
  4. If paper is inside a predefined area and sharp -> take a picture

I would combine this with audio. If the camera recognized the paper make some noice like a peep or something and the more the object is fitting the predefined area the faster the peep sound is played. That would make taking pictures for blind people possible.

Hope someone got ideas on that.

Mulgard
  • 8,305
  • 26
  • 110
  • 205

1 Answers1

1

OpenCV is an image processing framework/library. It does not "scan all objects inside the view of the camera". By itself it does nothing and yet it gives the use of a number of useful functions, many of which could be used for your specified application.

If the image is not cluttered and nothing is on the paper, I would look into using edge detection (i.e. Canny or similar) or even colour blobs (even though colour is never a good idea, if your application is always for white uncovered paper, it should work robustly).

OpenCV does add some overhead, but it would allow you to quickly use functions for a simple solution.

Jonathan Holland
  • 607
  • 9
  • 18