How do I embed web cam output on a browser?

asked 2019-01-28 21:20:16 -0600

FD gravatar image

I’ve created a game that uses OpenCV’s video capture function to open up a webcam, where the user can interact and score points using colour detection.

I’ve got the app running on xampp, started via a browser.

But on starting, The browser opens a new python window and the game can be played.

Is there a way to embed this window on a browser?

edit retag flag offensive close merge delete

Comments

1

@FD, I'm not sure but it might help you: https://docs.opencv.org/master/d5/d10... (OpenCV.js tutorials).

dkurt gravatar imagedkurt ( 2019-01-28 22:19:53 -0600 )edit

I’ve got the app running on xampp,

yea, but probably on your localhost. once you put it on a "real" server, it won't have access to any camera.

(bad planning ;)

while you can try to write a small MJPEG server (that's a video protocol, look it up, please) to serve your video feed to the browser, you probably need to rewrite it all, so it uses the webbrowsers (local, client, not from your server) camera from html / js.

again, have a look at opencv.js.

berak gravatar imageberak ( 2019-01-28 23:49:02 -0600 )edit