UPIS Interface Description


UPIS has moved to SourceForge
  As of August 2009, the UPIS codebase has been added to the official USARSim CVS repository. The newest release can be found in the Tools releases (v3.37 and up) at SourceForge, and the source code is available in the CVS in the usarsim/Tools/ImageServer directory. We will also be moving documentation to the official USARSim wiki.


Preface

The socket interface provided by UPIS can be backwards-compatible with the original ImageSrv application. Currently, it can produce 24-bit raw and JPEG-compressed pictures. If backwards-compatibility is desired, make sure to enable the legacy mode ( -l) command-line option.

Workflow

  1. Wait for connection from a client
  2. For each client:
    1. If legacy mode is enabled, transmit a full frame.
    2. Wait for a request from the client.
    3. Send out the requested picture
    4. Go to step 2.

Command-line options

Flag Name Default Description
-l Legacy mode off Server will transmit a full frame when new clients connect.
-f FORMAT Frame format GOOD Sets the compression format to one of the following case-sensitive tags: {RAW, SUPER, GOOD, NORMAL, FAIR, BAD}.
-s Frame skip 6 Sets the minimum number of frames to skip between captures.

Requests

OK Send out a full frame image
U[x][y][width][height] Send out a rectangular region of the full image (x, y, width, and height are unsigned 32-bit ints)

Data format

The server supports both raw pictures and jpeg pictures. The image data format is:

0 1 2 3 4 ...
1 byte 4 bytes n bytes
Image Type Image Size Image Data

Image Type is the format of the image. It can be:

0 raw data
1 jpeg - super quality
2 jpeg - good quality
3 jpeg - normal quality
4 jpeg - fair quality
5 jpeg - bad quality

Image Size is the total length of Image Data in bytes, represented as an unsigned int.

Image Data is the actual data of the image. The length of the data in bytes is specified by Image Size.

Raw data

Image Data is in the form:
0 1 2 3 4 5 6 ...
2 bytes 2 bytes 1 byte 1 byte 1 byte
width height R G B

Data is packed from left to right, from top to bottom.

JPEG Data

Image Data is in the form of pure jpeg data. It can be decompressed directly by any jpeg decoder.
Topic revision: r8 - 27 Aug 2009 - 16:14:08 - PrasannaVelagapudi
 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback