next up previous contents
Next: Java Applet Implementation Up: Sending Camera Input to Previous: Network Communication

Video Handling

As was mentioned in the chapter introduction, the quality and size of the video transfer was not given priority. No standardized compression scheme was implemented. The following steps were taken to somewhat reduce the bandwidth requirements:

Quantization
from eight to four bit grayscale, giving only 16 levels of gray. This way two pixels fit within a single byte. As no dithering is implemented to compensate for this quantization, the visual quality of the video is rather low.

Spatial resolution reduction
from 640 tex2html_wrap_inline4177 480, as sent from the video camera, to 160 tex2html_wrap_inline4177 120. The size is barely acceptable when used for viewing a closeup of a talking head.

Partitioning into blocks
of 8 tex2html_wrap_inline4177 8 pixels, only sending blocks identified as changed. A very simple change detection scheme is implemented: A block is said to have changed if the maximum absolute single pixel difference compared to the previous block sent for the same image location exceeds some threshold value. This scheme is far from perfect, but it is easily implementable.

Ten times a second, the grabber program gets a frame from an IndyCam connected to a Silicon Graphics Indy, aided by the Video Library [79] shipped with the computer. As described above, the frame is analyzed for changed blocks, and chosen blocks are sent across the network, packed in UDP datagrams of at most 1400 bytes. Since some blocks may never or seldom change, every block that has not been sent in 5 seconds are resent, even if no change is measured. This is to make sure every viewer shows the entire picture.

The bandwidth requirements depends on the dynamics of the scene grabbed, and the sensibility of the camera. The worst case occurs when all blocks need to be resent ten times a second: A block occupies 35 bytes, including position within the image, and a block identifier. An image contains 20 tex2html_wrap_inline4177 15 blocks, giving a total of 10500 bytes for a single frame. Ten frames per second thus requires a 0.8 Mbps line, not including overhead introduced by network packet encapsulation. According to figure 3.4 on page gif, neither analog modems nor ISDN, the two most likely connection types for home users, can cope with this. No negotiation of data transfer rate is implemented, the sender simply assumes that the network connection is capable of delivering the packets at the rate they are sent. Trying to send packets across a slow link, may fill the operating system's send queue, and temporarily stop the sending application.


next up previous contents
Next: Java Applet Implementation Up: Sending Camera Input to Previous: Network Communication

Sverre H. Huseby
Sun Feb 2 15:54:02 MET 1997