0

I am looking to valide when an object is being held close enough to the camera in webrtc and thought that I might detect a shape and compare the bounds to the size of the stream. It seemed like a simple enough task but I am having trouble detecting shapes with javascript. There are lots of examples of detecting faces or parts of faces with Haar cascades, but I am not sure if that is really what I should be looking for. The end goal would be to have something similar to banking apps that take a picture of a check once it's lined up or taking enough space in the stream. I am looking to just let the user know that that they have the item they will be taking a picture of centered and close enough to the camera. I have been looking at jsFeat which seems pretty cool and works well with predefined cascades such as faces, but how do i detect shapes or atleast the positioning of the main item in a video stream, without training my own cascades?

jumpdart
  • 1,702
  • 16
  • 35
  • Currently I just have some svg guide overlays to help users but would like them to like turn green or something when they have their item in a good position. – jumpdart Feb 01 '17 at 19:23
  • not quite sure if I am ready for this: http://cdn.intechweb.org/pdfs/5781.pdf – jumpdart Feb 01 '17 at 19:28

1 Answers1

2

Wow, shape recognition in a video stream, sounds like a challenge, and will need a powerful processor. These links may steer you in the right direction.

The first is titled "Object Detection with HTML5 getUserMedia", and is a discussion on face recognition using javascript, and provides a bunch of links to projects

http://techslides.com/object-detection-with-html5-getusermedia

The second is tracking.js

The tracking.js library brings different computer vision algorithms and techniques into the browser environment. By using modern HTML5 specifications, we enable you to do real-time color tracking, face detection and much more — all that with a lightweight core (~7 KB) and intuitive interface

https://trackingjs.com/

Have fun, it sounds like a cool project!

Mikkel
  • 7,693
  • 3
  • 17
  • 31