ImageServer v0.1.3

Grant Scott

ImageServer  is a robust server application that utilizes Morphological Shared-Weight Neural Networks (MSNN) to perform recognition tasks. ImageServer functions as an independent module of a larger robotic system, providing TCP/IP interfaces for other robotic modules and the ImageServer-Controller. Current features include USB web-cam image acquisition on Linux systems, networked Controller access, live updating of parameters, and vision processing using MSNN. ImageServer provides a dual TCP/IP channel system for client connections. The first channel is a simple query channel, allowing a client to send a single command request then closing the channel down after the response is sent. The second channel is a persistent connection channel, allowing clients to keep-alive the connection. Each channel has a separate command processing function, this allows the persistent connection channel to limit its usage only to vision commands. The query channel handles both vision and parameter modification commands, and uses a 30 second command timeout.

ImageServer Protocol Commands
Command Protocol Action/Result
IS_WHAT ~ Scans current visual image against ALL weight files
IS_WHO ~ Scans only the weight file associated with the tag name
IS_LOOK ~ Scans vertical slice of current visual image against ALL weight files
IS_KILLER Terminates Execution of the ImageServer
RESTART_IS Commands the ImageServer to execute a full shutdown and restart
RE_DB * Reloads the specified DB into memory, restores old on fail
RE_THRESH Resets the hit threshold gray-scale value used for scanning
RE_BLOB_SIZE Resets the size of a hit blob to qualify as a recognized target
RE_LOG * Cycles the Log file, closes the current one and opens a new one
* Commands are not current implemented
~ Commands available to the persistent channel


Image Acquisition  is accomplished through two modes of operation; direct video capture and file reads. ImageServer is currently in the transition phse from using disk I/O (from file) for acquisition, to USB web-cameras for direct memory mapped image aquisition. Through the use of the Parameter Definition file, ImageServer retains the ability to run in either mode. Additionally, acquisition mode can be modified while the server is running, like most ImageServer configuration settings and parameters.

Error/Signal Handling  capabilities are employed to ensure a stable run-time process, providing robust error and exception handling across a mult-threaded environment. ImageServer is resilient to TCP/IP connection failures and timeouts. Additionally, the COMMAND structure and specific interaction the server uses is fairly resistent to buffer overflow attacks by erroneous or malicous client connections. Once the initial database is loaded, the server can only be stopped by the kill -9, ^C, or the ImageServer-Controller. Use of the ImageServer-Controller to stop ImageServer requires a password.

ImageServer-Controller  is a network enabled control module for ImageServer. Currently there is a single command line version of the controller for Unix/Linux systems, a Windows controller will be developed in the future to provide remote monitoring and tuning of the server during run-time in a GUI interface. The current version of the controller can perform live updates to the server of various parameters as listed above and force ImageServer to reload itself from disk (e.g. when the server has been rebuilt or upgraded). NOTE: The Controller functionability is only available over the query channel.

ImageServer Parameter Defaults and Commandline Switches
Parameter Default Commandline Switch
Query Port 2003 -p####, where #### is the desired port number
Persistent Port 5150 -x####, where #### is the desired port number
Log Filename is-timestamp.log -lssss, where sss is the desired logname
Database File IS.db -dssss, where ssss is the desired database file
Parameter File param.conf -cssss, where ssss is the desired parameter file

Support Files 
    Database Definition File

IS.db

###
###	ImageServer
###		Database Definition File
### FORMAT> TargetName:ScanFile:WeightFile:	Comments about the target
###
###		- Grant Scott
### %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
bob:scanbob882.net:testbob882@125.wts:	Robert H Luke III, aka Terrorist
wiley:scanwiley.net:wiley4040.wts:				Wiley Cyote? Maybe!

    Parameter Definition File

param.conf

###
###	ImageServer
###		Parameter File
###  Format:  Parameter Value [Opt1] [Opt2] ... [OptN]
### 
###	Please Supply all available options and data someone
###	might possibly need as comment lines in this file.
### - Grant Scott 4/2/2003
### 
#########################################################
### Image Acquisition Source definition
### Parameter Value  [source_opt] [x_dim] [y_dim]
### ========= ====== ============ ======= =======
### ImgSource Camera /dev/video0 320 240
### ImgSource File ../currentScene.pgm 320 240
### %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ImgSource	Camera	/dev/video0	320	240
###
#########################################################
###	Captured Image Storage Location
###	Parameter Value
### ========= ======
### CaptDir   ImageFiles/
CaptDir   ImageFiles/
###
### EOF