[Net Cams PIC] Chapter VBI-17.   Networked Cameras


[ This chapter does not appear in the book. ]


In this chapter I'll develop a TCP/IP client/server cameras application: the clients send images obtained from their webcams to the server to be centrally displayed. The idea is illustrated in diagram at the top of the page.

A novel feature of the application is that a client divides its current camera image into subimages before passing them to the server. The client compares the subimages with ones obtained from the previously snapped image, and only those parts which have changed are sent. This approach is shown in the diagram below, with the camera's image divided into 16 parts.

[Subimages PIC]

On the left of the diagram, all the subimages are sent to the server by the client, and the it stitches them together before displaying the complete picture. However, the next client image (on the right of the diagram) only contains two changed areas, so only those need to be sent this time. The advantage is a reduction in the amount of network communication, related to how much the client's view of a scene changes from frame to frame. The downside is that the server will need to retain previous subimages, so they can be combined with the new ones.

The two diagrams above are somewhat misleading since the clients don't really send subimages to the server. The client transforms each image into a sequence of bytes, and sends those, together with an ID number identifying the subimage.

A screenshot of the server, called CamsViewer, displaying two views of the author is shown below. The third panel is white since there's no third client connected to the server at the moment.

[CamsViewer PIC]

Along with the clients' images, the server displays the number of changed subimages used to build each image. The user hasn't moved in Figure 3 since the previous camera snaps (around 100 milliseconds before), so both client images show zero changes.




Dr. Andrew Davison
E-mail: ad@fivedots.coe.psu.ac.th
Back to my home page