sigseg  manual  
The sigseg program is a Command Line Interface (CLI) program which makes use of a library implementing the Blake and Zisserman model in 1D. The sigseg program and the libseg_1d library are written in C language and have been developed and tested on a GNU/Linux OS.
Instruction on how to compile, install and run the sigseg program can be found in the "README.txt" file shipped with the program source code. 

The BlakeZisserman model is an extension of the MumfordShah model. These two models solve the problem of data segmentation following a variational approach, i.e,. solving a minimum problem involving energy functionals. The variational segmentation models produce a smooth approximation of the data. The data domain results in being partitioned in to disjoint and homogeneous regions which boundaries are explicitly handled by the model. i.e., data discontinuities cat be detected. The approximation based on the MumfordShah model "respects" the discontinuities of the data by preserving them from being smoothed. The approximation based on the BlakeZisserman model can "respect" also the discontinuities of the first derivative of the data. In this page, only a brief and rough overview of the variational approach is given with the aim to clarify the set up and the use of the program sigseg.
g is the data;
The first term of BZ(u) controls the "distance" between the solution u and the data.
Minimizing BZ(u) means that:
A numerical solution of BZ(u) can be found by the discretization of the following functional:
β ≤ α ≤ 2 β
with:
σ is a "discontinuity function" that "sees" the discontinuities of u; The two discontinuity functions σ and s replace the counting measures of the discontinuity set S_{u} and S_{u'} respectively. The parameter λ_{ε} should be set to zero in any applications (unless you know what you are doing). The parameter ε has to be just greater than 1/n, where n is the number of points of the data. E.g., if n=200 then set epsilon to 1/199.9
If the parameters β and γ are set to zero the above functional becomes:
Introductory elements on the BlakeZisserman and MumfordShah variational models, and details on the numerical implementation of the BlakeZisserman model in 1D can be found here (my PhD thesis in pdf). The CLI sigseg program requires the name of the file containing the data and the name of the file containing the values of the functional parameters to be specified as input parameter. The input file containing the data is a single column text file with the values of the data. The input file containing the functional parameters is a text file of the form:
Remember the condition: β ≤ α ≤ 2 β if you want to use the BlakeZisserman model. Remember to set the parameter beta and gamma to zero if you want to use the MumfordShah model.
The parameter "tol" is the convergence threshold of the iterative procedure implemented in the code to minimize the variational model in use. The sigseg program stops when the difference between the current solution and the solution computed at the previous iterative step is smaller than the "tol" value.
The parameter "mx_iter" is the maximum number of iterative steps performed before the sigseg program stops.
When a parameter is set to a value greater than zero, the other parameter should be set to zero. For instruction on how to run the sigseg program, see the "README.txt" file shipped with the program source code. See the folder "sample_data" shipped with the source code of the program for examples of input data and input parameters files. 

Notes
a) The current version of the sigseg program prints the result of the segmentation on the standard output, i.e., on the terminal window from where the program has been executed.
The folder "script" contains a bash script that can be used to run the sigseg program from the folder where the program has been complied. The script name is: "localrun.sh". Example of the use of the bash scripts.
Open a terminal window and move to the folder where the sigseg program has been compiled: The variable K is useful when different input data files and/or input parameters files are used, and you want to be able to compare different (plots of the) results.


Home  SW page  
..: 2009 :: Alfonso Vitti :.. 