0

I want to use the webcam on client-side for my image recognition web app (which is a python app running on a cloud server). I thought I could use that javascript & html snippet https://www.kirupa.com/html5/accessing_your_webcam_in_html5.htm in order to enable this feature. (Because standard Python libraries such as OpenCV2 are only working for local webcams). My question is how can I embedd that code into a runable Python (.py) file?

EchoCache
  • 555
  • 2
  • 8
  • 22
  • 1
    What does it mean _"to wrap html and javascript into a Python file"_? Why do you want to embed client-side frontend code into your server-side application? –  Jun 15 '21 at 09:23
  • Literally I just want to fetch the data from the webcams of the client-side and feed that data to my python script. What's the best way to achieve this? – EchoCache Jun 15 '21 at 09:27
  • 1
    Does this answer your question: [HTML5 solution to upload a webcam/camera video stream to server](https://stackoverflow.com/questions/13431251/html5-solution-to-upload-a-webcam-camera-video-stream-to-server)? –  Jun 15 '21 at 09:28
  • You have to understand that HTML and JS are running on client-side, and your python web app is on server-side. See [What is the difference between client-side and server-side programming?](https://stackoverflow.com/q/13840429/2745495). You will have to either do _all_ the processing on client-side, or somehow send/upload the webcam frames from client-side and pass it to your server-side app. There is no "wrapping"/"embedding" into Python file. – Gino Mempin Jun 15 '21 at 12:12

0 Answers0