Custom Camera Code
I have a camera setup at my front door streaming video to my office at the back of the building so I can see who is there before going to answer their knock. Hawkers tend to wear particular clothing and carry clipboards, so I don't bother going to answer the door for them. Couriers wear distinctive uniforms and tend to not wait around for long enough after they knock, so if I see one approaching the front door I have to drop everything and head down there before they knock. Here's the setup:
The computer on the wireless network is behind NAT so connecting to it is difficult, so instead I make the code pulling the frames from the webcam connect to the office linux machine which runs a gtk+ app to display the frames. Here's the source code:Windows code to grab frames and send them.
Linux code to listen for frames and display them.
Linux code to grab frames and display them. (not used).
The code includes a number of quirks that are specific to my situation, hard coded ip addresses, hacks to fix broken pixels, etc. This code may not be of much use to you but it took me a few hours to write, so if you're trying to do something similar, or just want an example of how to capture frames on Windows/Linux, or display them on Linux, there ya go.
<< back to my home page