Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Streaming webcam data to a webpage

My intention:

  • Stream webcam feed to a webpage.
  • Have buttons that talk to a Python program.

I'm planning on using OpenTLD (AKA Predator) to get information about a moving speaker via webcam. Then I will send the coordinates to Python, which will do calculations, and send it via the serial connection (using pyserial) to an Arduino that'll move a motor which moves a camera.

I'd like a web interface for remote preview/manual control of the Arduino, via talking to the Python controller/program.

I'm looking for something that runs on Ubuntu that allows the webcam stream to be displayed and commands to be sent to a Python program.

like image 769
Joel Garboden Avatar asked Nov 04 '22 16:11

Joel Garboden


1 Answers

I would suggest the following:

  1. Capture and write to file:
  2. Read file and calculate coordinates
  3. Use Python or any other language to send the signals over serial.

You might need to incorporate some feedback aspect for proper control. For capturing and writing to files, there should be range of programs. Many programs are capable of taking snapshots and writing to files (same name or separate ones) instead of video which you can exploit. I can't recollect the name, but I remember using one such program on Ubuntu.

like image 66
Neel Mehta Avatar answered Nov 07 '22 05:11

Neel Mehta