The Multimedia Project

Intermediate Module Programmer's Guide
Intermediate module - the main module, connecting all system
components. It provids interaction of the user interface module
with all other parts of the system (database server, multimedia algorithms).
The intermediate module runs on the computer where the data physically resides
(data server). It understands a predefined protocol of requests.
It receives requests from the user interface module, performs necessary
operations and returns results to the user interface module.
Possible requests include querying the database, altering the database (inserting, deleting rows)
and running multimedia algorithm.
The intermediate module is implemented in C with embedded SQL and consists of
the following files:
-
InterSIO.ec
-
InterSIO.ec is the main file of the intermediate module. It receives requests from
the interface module and calls the corresponding functions to perform them.
Inter.ec defines constants and data structures used in the intermediate module.
The following requests are accepted by the intermediate module:
-
Disconnect from a current database
-
Connect to a database
-
Run algorithms for speech keyword processing
- Recognition of a keyword in a voice file.
- Training a word and generating a model of a trained word. The model is a
matrix with probabilities.
- Joining the models of the keyword and its neighbors to
generate the join model of the keyword.
- Finding a threshold of the probability that the keyword fits the model,
using garbage words.
- Finding a size of a check window for recognition, by calculating the
average length of keywords and finding the distance from the beginning of
one check window to the next one
- Coping files that participate in training to a specific directory.
-
Execute a SELECT SQL query - a recieved SQL query is executed and the results
are sent to the interface module
-
Execute a NOT SELECT SQL query - a recieved SQL query is executed and the status
is sent to the interface module
-
Run texture-based image segmentation algorithm.
-
Process_q.ec
-
Process_q.ec is responsible for the following actions:
-
Connecting to a database - executing the corresponding SQL query.
-
Processing not SELECT query - executing an SQL query.
-
Processing SELECT query - executing an SQL query and
calling to the corresponding function to write results (disp.ec ).
-
Disp.ec
-
Disp.ec is responsible for writing one row of query results to a file, which
is stdout for simple query processing or input file for the recognition algorithm.
The row is written in a format: value1|value2| ... |valueN,
where each value is a value of an attribute in the SELECT clause of the SQL
query.
-
voice.ec
-
Voice.ec contains functions for running voice processing algorithms.
-
runmatlab.ec
-
Runmatlab.ec runs an algorithm for image segmentation.