Home

  The Project

  Network

  Calibration

  Image Processing

  3D Reconstruction

  Tracking

  OpenGL
  Instructions

  Ideas

  Download

  Team

 

Network


We opted for a network architecture, in order to perform real-time captures.




NETWORK OVERVIEW

The network is coded in C (adapted for our C++ architecture). The protocol used is TCP (we need reliability of the transferts). We use winsocks (sockets) to communicate.

CLIENTS

A client machine has the image processing job to do. First it connects to the server, who send back an ID. Then it waits for the calibration request, and send back its calibration data, now waiting for the initialisation request. When received, several windows open : the two first are the camera configuration. Then we have the video stream on a side, and the processed image on another one (we only see white spots). We can set the thresholds needed to the algorithms, and see the results in real time. We need to click on the white spot to begin the tracking, and we hit return when it's done. The client waits for the first capture start request (sent by the server).

Then, to allow synchronisation of every clients, one makes a shot only when it has received a capture request from the server, process the picture, and sends the data back to the server.

SERVER

The server use the function SELECT to get data from the open sockets. That permits to avoid the use of thread, server side. Once initialised, a listening socket wait for incoming connections. The new sockets are put in an array. Several key allow us to initialise sequences : 'C' for Calibration request, 'I' for Initialisation request, 'S' for start request.

PAQUETS FORGED

The paquets going on the network are built following a little protocol that we set up. Don't forget that we have a little module called Calibr[Client/Server] that allow us to take singles shot, used during the calibration process.

  • CalibrServer -> CalibrClient

    [0x00] -> Shot Request (1 byte)

    [0x01] -> Initialisation Request (1 byte)

  • CalibrClient -> CalibrServer

    [0x00] -> Shot acknowledgment (1 byte)

  • CheapMocapServer -> CheapMocapClient

    [N] -> Identification (clients set itself as client N) (1 byte)(valid during the connection only)

    [0x00] -> Calibration Request (1 byte)

    [0x01] -> Initialisation Request (1 byte)

    [0x02] -> Start Request (1 byte)

  • CheapMocapClient -> CheapMocapServer

    [0x02|TTT|RRRRRRRRR|KKKKKKKKK] -> Calibration response (85 bytes)

    T = Translation Vector, R = Rotation Matrix, K = Intrinsec Matrix

    [0x01|ID|1|N|DATA] -> Capture Data Response (7+8*N bytes)

    N = Number of spots detected

    DATA = Array of the spots coordinates

SEQUENCE

Here a schematic representation of what happens between a client and the server.