The Matlab interface to the vision server consists of a single routine to interact with the vision server: mVision. Connection to and interaction with the vision server are achieved by using different arguments to the mVision function. The mVision function performs three different functions: opening communication with the vision server, requesting data for a particular object from the vision server, and closing communication with the vision server. The vision routines use port identifiers to maintain connections to the vision server. By using this system a single Matlab session would be able to make connections to multiple vision servers or to make multiple connections to a single vision server. Each time a connection to a vision server is opened with the 'open' command it should later be closed with the 'close' command. Typically the usage is of the form: result=mVision(command [, options]) The available commands are: 'open' - Open a connection to the vision server Arguments: The character representation of the TCP/IP address of the machine running the vision server Returns: A port identifier used for future communication with the vision server. Example: vis_port=mVision('open','127.0.0.1'); % Open a connection to the server on the machine with address % 127.0.0.1 (This is a loop back address - it will always connect % to the machine on which the Matlab session is running) % And save the port identifier in the vis_port variable 'close' - Close the connection to the vision server Arguments: A port identifier created by the 'open' command Returns: Nothing Example: mVision('close',vis_port); % Close a connection to the vision server that was created earlier % and who's port identifier was stored in the vis_port variable. 'get' - Get information about an object Arguments: A port identifier created by the 'open' command A character representation of the name of and object on the current vision server. The object should be either a Rectangle, a Circle, or a Line type object. Returns: An array of four elements. The meaning of each element different depending on the type of object for which information was requested. ret(1) ret(2) ret(3) ret(4) Rectangle x coord of corner y coord of corner width height Circle x coord of center y coord of center radius radius Line x coord of start y coord of start x coord of end y coord of end Example: loc=mVision('get',vis_port,'Ball'); % Request information about an object called "Ball" from the % vision server who's port identifier was stored in the vis_port % variable. % If the "Ball" object is a circle that is being tracked, % loc(1) = X coordinate of the center % loc(2) = Y coordinate of the center % loc(3) = radius % loc(4) = radius