Deploying Flask based OpenCV application on Heroku PaaS
Hi,
I have a simple Face Detection application developed using Flask and OpenCV, and is working fine on my local machine (laptop) because it is using my laptop's camera for capturing images.
When I deployed this app in Heroku server, the application was built and deployed successfully but it fails to identify the client side camera, when invoked using the browser, though I changed the port to 0.0.0.0.
Seems it is trying to invoke the Heroku Server's camera instead of identifying my laptop's camera.
Application URL: https://faceeyesdetector.herokuapp.com/ Github URL: https://github.com/socratesk/FaceEyeD...
Please let me know what configuration should I change so that it works on my local machine, while deployed on to Heroku server.
Thanks!
did you really expect a python script running VideoCapture(0) on the server will open a client's webcam ? that's entirely the wrong concept.
one way to do this is to serve html/js, that invokes the client's cam via js in the browser (and maybe also runs the facedetection locally, using e,g, picojs, then sends results back to your server)
you also could use opencv.js for this task