Camera Control

Click anywhere on the image to centre (roughly) that bit of the image.


The thing I bought (with evil affiliate code)

This is based on a £35 wireless pan and tilt camera, but with a bit of python running on a separate web server to control it. The mjpeg video stream is direct from the camera and it has a clickable imagemap overlay which chops up the image into 40px squares. Clicking a square requests a simple web service running on a computer close to the camera which starts the camera moving and stops it again after a fraction of a second multiplied by the number of pixels it needs to move. The camera itself has no absolute or relative positioning, it is just done by careful timing of the start and stop signals.

The camera can move in diagonal directions, it would be nice to get it to smoothly move to a new location smoothly first by panning and tilting, then the rest of the way on one axis. Might be nice to have something round the outside of the image to allow you to move double the distance, at the moment you can move a half frame in one click would be nice to be able to go a whole frame away.

The camera stream has a maximum of 4 concurrent viewers, a few more if I drop the resolution to 320x200. For lots of viewers I would use ffmpeg to reencode from mjpeg to something else on the fly and possibly pass it to a streaming server of some kind, the overlay control should work just as it is over a multicast video stream. In reality, if you are expecting more than a couple of concurrent viewers they are going to argue over control too much.


-320,-240 -320,-200 -320,-160 -320,-120 -320,-80 -320,-40 -320,0 -320,40 -320,80 -320,120 -320,160 -320,200 -280,-240 -280,-200 -280,-160 -280,-120 -280,-80 -280,-40 -280,0 -280,40 -280,80 -280,120 -280,160 -280,200 -240,-240 -240,-200 -240,-160 -240,-120 -240,-80 -240,-40 -240,0 -240,40 -240,80 -240,120 -240,160 -240,200 -200,-240 -200,-200 -200,-160 -200,-120 -200,-80 -200,-40 -200,0 -200,40 -200,80 -200,120 -200,160 -200,200 -160,-240 -160,-200 -160,-160 -160,-120 -160,-80 -160,-40 -160,0 -160,40 -160,80 -160,120 -160,160 -160,200 -120,-240 -120,-200 -120,-160 -120,-120 -120,-80 -120,-40 -120,0 -120,40 -120,80 -120,120 -120,160 -120,200 -80,-240 -80,-200 -80,-160 -80,-120 -80,-80 -80,-40 -80,0 -80,40 -80,80 -80,120 -80,160 -80,200 -40,-240 -40,-200 -40,-160 -40,-120 -40,-80 -40,-40 -40,0 -40,40 -40,80 -40,120 -40,160 -40,200 0,-240 0,-200 0,-160 0,-120 0,-80 0,-40 0,0 0,40 0,80 0,120 0,160 0,200 40,-240 40,-200 40,-160 40,-120 40,-80 40,-40 40,0 40,40 40,80 40,120 40,160 40,200 80,-240 80,-200 80,-160 80,-120 80,-80 80,-40 80,0 80,40 80,80 80,120 80,160 80,200 120,-240 120,-200 120,-160 120,-120 120,-80 120,-40 120,0 120,40 120,80 120,120 120,160 120,200 160,-240 160,-200 160,-160 160,-120 160,-80 160,-40 160,0 160,40 160,80 160,120 160,160 160,200 200,-240 200,-200 200,-160 200,-120 200,-80 200,-40 200,0 200,40 200,80 200,120 200,160 200,200 240,-240 240,-200 240,-160 240,-120 240,-80 240,-40 240,0 240,40 240,80 240,120 240,160 240,200 280,-240 280,-200 280,-160 280,-120 280,-80 280,-40 280,0 280,40 280,80 280,120 280,160 280,200