/home/oan/prosjekt/gotools/segmentation/gpl_distro/lsseg_1.0_gpl/app/segmentation2D.C File Reference

#include "LevelSetFunction.h"
#include "NormalDistributionForce.h"
#include "ParzenDistributionForce.h"
#include "SingleRegionAlgorithm.h"
#include "MultiRegionAlgorithm.h"
#include "Region.h"
#include "simple_tools.h"
#include "cimg_dependent.h"
#include "level_set.h"
#include "Filters.h"
#include "image_utils.h"
#include "colordefs.h"
#include <time.h>
#include <string>
#include <assert.h>
#include <stdexcept>

Go to the source code of this file.

Functions

void show_usage ()
 list of colors
void parse_command_line (int varnum, char **vararg)
void initialize_levelsets (vector< LevelSetFunction > &phi)
int main (int varnum, char **vararg)

Variables

int LOWEST_RES = 70
 lowest resolution of downsampled image
double NU_FACTOR = 1.5
 boundary smoothness factor
double P = 1.5
 nonlinear smoothing factor
double SMOOTHING_FACTOR = 0.3
 threshold for when to stop when carrying out anisotropic presmoothing (lower value means more smoothing.
double DOWNSCALING_FACTOR = sqrt(double(2))
 by which factor should we downsample the image (in x-resolution and y-resolution)
int FIRST_ITERATIONS = 1800
 number of iterations for segmentation on lowest level
int LATER_ITERATIONS = 500
 number of iterations on higher levels
int USE_ORIG_IMAGE = 2
 2->use color info, 1->use grayscale, 0->do not use original image
int USE_STRUCTURE_TENSOR = 1
 use the structure tensor in the segmentation process, 1->yes, 2->no
int USE_SCALE_INFO = 1
 use the scale measure in the segmentation process, 1->yes, 2->no
int NUM_REG = 2
 number of segmented regions. Default is normal, two-region segmentation
int INIT_SEG_TYPE = 0
bool SHOW_INTERMEDIARY = true
 show intermediary results. Turn off if you do not want to push a key to continue from time to time
bool SAVE_SEG = false
 save the resulting segmentation (currently works for two-region segmentation only)
string SAVE_FILENAME
 filename to use when saving results
bool USE_MASK = false
 whether or not to use a Mask
Mask mask_object
 Mask to use
int MFLIP = 0
 define if the Mask or its inverse should be used for masking.
const double SCALE_FAC_DT = 1
 timestep size for computing scale measure
const double SCALE_FAC_T = 15
 number of timesteps to use when computing the scale measure
const int REINIT_MODULO_LOWEST = 100
 how often reinitialization should be applied on the coarsest level.
const int REINIT_MODULO_OTHER = 20
 how often reinitialization should be applied on higher levels
const int ANISOTROPIC_DT = 3
 timestep size when carrying out anisotropic smoothing
const int PARZEN_LIMIT = 150 * 100
 how high the image resolution should get before applying the Parzen probability estimate rather than using a normal distribution
const int TOTAL_NUM_COLORS = 9
 number of available colors (excluding the background color, black)
const int * COLORS [] = {YELLOW, CYAN, MAGENTA, WHITE, GREY, BROWN, GREEN, BLUE, RED, BLACK}


Function Documentation

void initialize_levelsets ( vector< LevelSetFunction > &  phi  ) 

Definition at line 433 of file segmentation2D.C.

int main ( int  varnum,
char **  vararg 
)

Definition at line 114 of file segmentation2D.C.

void parse_command_line ( int  varnum,
char **  vararg 
)

Definition at line 321 of file segmentation2D.C.

void show_usage (  ) 

list of colors

Definition at line 463 of file segmentation2D.C.


Variable Documentation

const int ANISOTROPIC_DT = 3

timestep size when carrying out anisotropic smoothing

Definition at line 101 of file segmentation2D.C.

const int* COLORS[] = {YELLOW, CYAN, MAGENTA, WHITE, GREY, BROWN, GREEN, BLUE, RED, BLACK}

Definition at line 106 of file segmentation2D.C.

double DOWNSCALING_FACTOR = sqrt(double(2))

by which factor should we downsample the image (in x-resolution and y-resolution)

Definition at line 63 of file segmentation2D.C.

int FIRST_ITERATIONS = 1800

number of iterations for segmentation on lowest level

Definition at line 65 of file segmentation2D.C.

int INIT_SEG_TYPE = 0

centered circle for two regions; 0 -> centered circle for two-region segmentation, or random voronoi for multiregions. n > 0 -> a given number of horizontal stripes, n < 0 -> (for multiregions) number of fragmented voronoi regions.

Definition at line 79 of file segmentation2D.C.

int LATER_ITERATIONS = 500

number of iterations on higher levels

Definition at line 67 of file segmentation2D.C.

int LOWEST_RES = 70

lowest resolution of downsampled image

Definition at line 55 of file segmentation2D.C.

Mask mask_object

Mask to use

Definition at line 89 of file segmentation2D.C.

int MFLIP = 0

define if the Mask or its inverse should be used for masking.

Definition at line 91 of file segmentation2D.C.

double NU_FACTOR = 1.5

boundary smoothness factor

Definition at line 57 of file segmentation2D.C.

int NUM_REG = 2

number of segmented regions. Default is normal, two-region segmentation

Definition at line 75 of file segmentation2D.C.

double P = 1.5

nonlinear smoothing factor

Definition at line 59 of file segmentation2D.C.

const int PARZEN_LIMIT = 150 * 100

how high the image resolution should get before applying the Parzen probability estimate rather than using a normal distribution

Definition at line 103 of file segmentation2D.C.

const int REINIT_MODULO_LOWEST = 100

how often reinitialization should be applied on the coarsest level.

Definition at line 97 of file segmentation2D.C.

const int REINIT_MODULO_OTHER = 20

how often reinitialization should be applied on higher levels

Definition at line 99 of file segmentation2D.C.

string SAVE_FILENAME

filename to use when saving results

Definition at line 85 of file segmentation2D.C.

bool SAVE_SEG = false

save the resulting segmentation (currently works for two-region segmentation only)

Definition at line 83 of file segmentation2D.C.

const double SCALE_FAC_DT = 1

timestep size for computing scale measure

Definition at line 93 of file segmentation2D.C.

const double SCALE_FAC_T = 15

number of timesteps to use when computing the scale measure

Definition at line 95 of file segmentation2D.C.

bool SHOW_INTERMEDIARY = true

show intermediary results. Turn off if you do not want to push a key to continue from time to time

Definition at line 81 of file segmentation2D.C.

double SMOOTHING_FACTOR = 0.3

threshold for when to stop when carrying out anisotropic presmoothing (lower value means more smoothing.

Definition at line 61 of file segmentation2D.C.

const int TOTAL_NUM_COLORS = 9

number of available colors (excluding the background color, black)

Definition at line 105 of file segmentation2D.C.

bool USE_MASK = false

whether or not to use a Mask

Definition at line 87 of file segmentation2D.C.

int USE_ORIG_IMAGE = 2

2->use color info, 1->use grayscale, 0->do not use original image

Definition at line 69 of file segmentation2D.C.

int USE_SCALE_INFO = 1

use the scale measure in the segmentation process, 1->yes, 2->no

Definition at line 73 of file segmentation2D.C.

int USE_STRUCTURE_TENSOR = 1

use the structure tensor in the segmentation process, 1->yes, 2->no

Definition at line 71 of file segmentation2D.C.


Generated on Tue Nov 28 18:35:47 2006 for lsseg by  doxygen 1.4.7