-1

I am trying to make an application that detect an ID card So how can I make a rectangle appears when the camera starts by using OpenCV ?

And the user has to fit the credit card inside that box and the program knows that the card fits it.

I tried to search but I didn't reach anything so any links or solutions would be great.

Ahmed Ramzy
  • 839
  • 1
  • 11
  • 18
  • What about the drawing function [rectangle](http://docs.opencv.org/modules/core/doc/drawing_functions.html#rectangle)? – Miki Aug 20 '15 at 20:10
  • then ? how can the program knows that the cards fits the rectangle ? – Ahmed Ramzy Aug 20 '15 at 21:33
  • Oh well... Overly broad question then... Have a further look on SO, there are a lot of question on this topic – Miki Aug 20 '15 at 21:41

1 Answers1

0

Simply use rectangle() for drawing a rectangle.

Regarding the implementation of detecting an ID card, I would try using feature matching (on a matrix of the rectangle's area), then measure the "level" of matches to determine positive and negative matches. This will require a degree of refining to determine the desired thresholds.

This page may be helpful.

You may also find this post helpful Object detection with OpenCV Feature Matching with a threshold/similarity score - Java/C++

Community
  • 1
  • 1
Tomme
  • 311
  • 1
  • 7