Project in Developer Circle (DevC) is sponsored by Facebook. The course is ogranized at CoderSchool. The problem is selected among company in Vietnam which is of Fe-Credit.
For detection fake or real Vietnam identity card.
- Input: the identity card image
- Output: card fake or real
Assumtion: a straight image is considered template image. Not for distorted or dark or low resolution image.
Result: detect fake card on
- card template: size, ratio size of card
- profile image with a selfie image (user capture thier picture manually)
- national emblem: just check with templage image
- information of identity card: Id number, full name, day of birth, address
- Card teamplate Border of card is main factor to verify. We find border of image then crop exactly follow by border to facilitate later steps.
To detect border, we filter image by color (dark green) then get contour image.
Result:
Cropped card: (example)
- Profile image We crop profile image and apply some algorithms:
- Profile image must be a person (not animal or stuff)
- Person do not wear glasses
- Person do not smile/laught ( kind of neutral)
- Compare with selfie image
- National emblem
We crop national emblem from cropped card then using
opencv image template matching
to check
- Information Thank to the exactly cropped card, we again crop different area on image for extracting information. If a real card, it will has const ratio size so we can know where area has the needed information (ex: card id, name, address,...)
Using opencv ocr tesseract
, we will get information on card but it is not be exact. Image is filtered in many differnce range colors then we get the best result from previour filter color to apply OCR on that image by frequently appear resutl.
To easily in checking fault card, we build a mobile app. Mobile app allow user take a picture of identity card then verify.
Application is an app for student participate the entry exam. So each student must be verify their identiy card to join the online test.