Thursday, October 13, 2005

Create your own windows based camera surveillance system

Looking on the net for a solution to create a webcam based surveillance system I came across many options, none of them really free and others just Linux based. I was looking for a way to capture webcam images in regular intervals with motion detection included, the software that came with my webcam didn't have those options.

After some hunting I found Dorgem, a windows application created by Frank Fesevur, browse his site and see some live demos of this applications in the users area.

Some basic configuration

After downloading the installation executable dorgem210.exe and before running it, you must make sure your webcam drivers are installed, follow the manufacturer's instructions and install the drivers before connecting the cam to your computer.

Once you install it, run it and you will be presented with the main screen:

Click the preview button and check if you get any picture, if you don't click the format button.

Change the pixel depth and compression to something your camera can provide, in my case I used RGB 24, also you can change the resolution of the picture to something your camera is capable of.

Go back to the main screen, click options and you will see a screen like follows, in the general tab you can set up the motion detection feature, what is does is to resume the capturing process when something steps in front of the camera or "movement" is detected, this will save you some processor cycles and hard drive/remote directory space.

In the AVI tab you will be able to store the captured picture frames into a single uncompressed AVI file, very convenient for later viewing of all the events that could appear as a single movie. If your camera will run for several days, check the new file at midnight box to create a new file each day.

On the Next tab you will find a webserver, this is one of the greatest features of this little application, publish your web cam online from your computer, no subscriptions and no extra requirements, just click the Server type drop down list and select still images option, select a refresh rate like 10 seconds, click ok, point your favorite web browser to localhost:8080 (like in this example, you can change the port to whatever you want) and you will be able to see your web cam from across the internet, for the router/firewall owners remember to open/enable and forward the port you set.

Other feature of this application includes is the ability to impress text and images on the frames, dynamically or statically, also you can include time stamps (more on this later). Go to the main screen and click on caption settings, you will see the next screen:


Click add to include as many text/image captions as much space you have on your frame.


If you select text, the next screen will show up, give a name to your caption (just for management of your titles), in the text box you can type any message you want, including tags for time stamping. The file box will let you browse for a plain text file with content you want to draw on the frames, this text file can be dynamically generated to change the message from time to time, think of a weather report system or a news ticker. Finally you can adjust all the parameters around the displaying of text, like font front color, background color, type and position on the screen



An example of the use of tags in the text field:

Using "Hello the current time is %t" will yield the a current system time message like "Hello the current time is 22:45" drawn on each frame. More tags and info on tags in the application documentation.

If you select a bitmap as a caption you'll get the following screen, write a name for your caption, enable it, browse for a bitmap to draw on your frames (think of a CNN like logo image), in the type drop down list you can select between transparent, multiply and copy (don't select multiply or copy they crashed my system a couple times), when transparent is selected you can click on the Transparant button on the right and choose what color you want to be transparent, like the image's background. The position button will let you align your picture at will.


There is one more option I want to write about and that's the storage settings, these will let you write captured frames to your local system, remote systems through http, ftp and https or even feed the frames to external applications, you will be able to send copies of the images to multiple targets at once. On the main screen, click on the storage setting button and then add, select what type of storage you require and write in the text boxes accordingly. Remember to go easy with the intervals for writing the captured frames mostly with the http and ftp options, the net speed connection can fluctuate and the results can be undesired. Also remember the passwords for the http and ftp options will go in clear text over the network, use this options for LANs behind a firewall and in case you want to send the images across the internet use the https option (make sure the server receiving the images is able to receive files under this protocol). A cool idea could be the creation of cron or task jobs on the remote server to process the images to even more customized solutions like email or web sites.




Finally I want to say this application supports multiple cameras to create a multi angle views of the area of interest, you can pickup cheap web cams on ebay and USB hubs to create a fortress like control room, I could not test this option though.

A shout to Frank Fesevur for creating this great application.