$search

FgBgSegment Class Reference

Top-level segmentation class. More...

#include <fgbgsegment.h>

List of all members.

Classes

class  Background
 Class modelling background hypothesis. More...
class  ColorModel
 Color model class. More...
class  FlatSurface
 Class modelling flat surface hypothesis. More...
class  Foreground
 Class modelling foreground hypothesis. More...

Public Member Functions

void Execute (Image< uint8_t > &image, Image< float > &disp, bool initialize, int loops=1, int startx=-1, int starty=-1)
 Execution of Segmentation.
 FgBgSegment (int width, int height, int drange, float gradWeight=20.0, float w_size=0.20f, float b_size=0.20f)
 Constructor.
float GetGradWeight ()
 Get current gradient weight Flag.
void GetSurfaceMinMax (float &min_x, float &min_y, float &max_x, float &max_y)
void GetSurfaceParameters (float &alpha, float &beta, float &disp)
 Get Surface Parameters from current estimation.
bool GetUniform ()
 Get uniform Flag.
bool GetWithColorHoles ()
 Get withColorHoles Flag.
bool GetWithColors ()
 Get withColors Flag.
bool GetWithDisparities ()
 Get withDisparities Flag.
bool GetWithSurface ()
 Get withSurface Flag.
void MakeBorderImage (Image< uint8_t > &image)
 Dump Segmentation Image.
void MakeMaskImage (Image< uint8_t > &image, int val=255, int obj=0)
 Dump Segmentation Mask Image.
void MakeSegmentImage (Image< uint8_t > &image)
 Dump Segmentation Image.
void SetGradWeight (float val)
 Set gradient weight Flag.
void SetNewForeground (Image< uint8_t > &mask, Image< float > &dimg, int drange, bool reuseLast=false)
 Set new foreground hypothesis.
void SetNewForeground (int startx, int starty, Image< float > &dimg, int drange_)
 Set new foreground hypothesis.
void SetUniform (bool val)
 Set uniform Flag.
void SetWithColorHoles (bool val)
 Set withColorHoles Flag.
void SetWithColors (bool val)
 Set withColors Flag.
void SetWithDisparities (bool val)
 Set withDisparities Flag.
void SetWithSurface (bool val)
 Set withSurface Flag.
void UseGPU (bool gpuopt=true)
 Whether or not to use the GPU based belief propagation.
 ~FgBgSegment ()

Static Public Attributes

static const int hist_size = 12
 number of histogram bins

Protected Member Functions

void CreateHistograms (bool allPoints)
 Create all histograms.
void InitSegmentation ()
 Initialise the segmentation.
void RGBToHSV (Image< uint8_t > &cimg)
 Conversion of images from RGB to HSV.

Static Protected Member Functions

template<int numFigures>
static void PixSegment (FgBgSegment &segm)
 CPU based segmentation object.

Protected Attributes

float ballSize
std::vector< ColorModelcolorPriors
 Prior color models.
CudaSegmentcudaSegment
 CUDA based segmentation object.
Image< float > * disparities
 Current disparity data.
int drange
 Disparity Range.
std::vector< Foreground * > figures
 Foreground model.
bool gpuopt
 Whether GPU optimization is used.
float gradWeight
 Gradient Importance Weight.
Image< uint8_t > grey
 Grey image data.
Background ground
 Background model.
int height
 Image height.
Image< uint8_t > hue
 Hue image data.
Image< uint8_t > saturation
 Saturation image data.
FlatSurface surface
 Flat surface model.
bool uniform
int verbose
 Amount of status output.
int width
 Image width.
float windowSize
 For controlling rough size of initialisation region around point.
bool withColorHoles
 Whether data has incomplete color information.
bool withColors
 Whether to use colour cue.
bool withDisparities
 Whether to use disparity cue.
bool withSurface
 Whether to use surface model.

Static Private Attributes

static const float eps = 1e-6f

Friends

class CudaSegment

Detailed Description

Top-level segmentation class.

Definition at line 106 of file fgbgsegment.h.


Constructor & Destructor Documentation

FgBgSegment::FgBgSegment ( int  width,
int  height,
int  drange,
float  gradWeight = 20.0,
float  w_size = 0.20f,
float  b_size = 0.20f 
)

Constructor.

Segmentation

Parameters:
width Width of the Image
height Height of the Image
drange Disparity range
gradWeight Gradient Importance Weight

Definition at line 51 of file fgbgsegment.cpp.

FgBgSegment::~FgBgSegment (  ) 

Definition at line 77 of file fgbgsegment.cpp.


Member Function Documentation

void FgBgSegment::CreateHistograms ( bool  allPoints  )  [protected]

Create all histograms.

Create all histograms for foreground, background and flat surface hypotheses

Parameters:
allPoints Whether to use all points to create histograms or only those in the disparity range

Definition at line 1111 of file fgbgsegment.cpp.

void FgBgSegment::Execute ( Image< uint8_t > &  image,
Image< float > &  disp,
bool  initialize,
int  loops = 1,
int  startx = -1,
int  starty = -1 
)

Execution of Segmentation.

Execution of Segmentation on one image for a number of iterations

Parameters:
image Image to segment
disp Disparity Image
initialize Whether or not to reinitialise the models
loops How many iterations per image
startx not used
starty not used

Definition at line 1604 of file fgbgsegment.cpp.

float FgBgSegment::GetGradWeight (  ) 

Get current gradient weight Flag.

Definition at line 1504 of file fgbgsegment.cpp.

void FgBgSegment::GetSurfaceMinMax ( float &  min_x,
float &  min_y,
float &  max_x,
float &  max_y 
)

Definition at line 1452 of file fgbgsegment.cpp.

void FgBgSegment::GetSurfaceParameters ( float &  alpha,
float &  beta,
float &  disp 
)

Get Surface Parameters from current estimation.

Definition at line 1441 of file fgbgsegment.cpp.

bool FgBgSegment::GetUniform (  ) 

Get uniform Flag.

Definition at line 1483 of file fgbgsegment.cpp.

bool FgBgSegment::GetWithColorHoles (  ) 

Get withColorHoles Flag.

Definition at line 1476 of file fgbgsegment.cpp.

bool FgBgSegment::GetWithColors (  ) 

Get withColors Flag.

Definition at line 1469 of file fgbgsegment.cpp.

bool FgBgSegment::GetWithDisparities (  ) 

Get withDisparities Flag.

Definition at line 1497 of file fgbgsegment.cpp.

bool FgBgSegment::GetWithSurface (  ) 

Get withSurface Flag.

Definition at line 1490 of file fgbgsegment.cpp.

void FgBgSegment::InitSegmentation (  )  [protected]

Initialise the segmentation.

Definition at line 595 of file fgbgsegment.cpp.

void FgBgSegment::MakeBorderImage ( Image< uint8_t > &  image  ) 

Dump Segmentation Image.

Dump Bordered Segmentation Image to a file segm*.ppm

Parameters:
image RGB image to be overlayed with segmentation border

Definition at line 1552 of file fgbgsegment.cpp.

void FgBgSegment::MakeMaskImage ( Image< uint8_t > &  image,
int  val = 255,
int  obj = 0 
)

Dump Segmentation Mask Image.

Dump Segmentation Mask Image to a file mask*.pgm

Parameters:
image Binary image to be Dumped
val Intensity value of the segmentation mask
obj ID of foreground hypothesis

Definition at line 1533 of file fgbgsegment.cpp.

void FgBgSegment::MakeSegmentImage ( Image< uint8_t > &  image  ) 

Dump Segmentation Image.

Dump Segmentation Image to a file segm*.pgm

Parameters:
image Gray-level image to be Dumped

Definition at line 1506 of file fgbgsegment.cpp.

template<int numFigures>
void FgBgSegment::PixSegment ( FgBgSegment segm  )  [inline, static, protected]

CPU based segmentation object.

Templated CPU based segmentation object given the number of foreground objects to segment

Parameters:
segm Segmentation object

Definition at line 1231 of file fgbgsegment.cpp.

void FgBgSegment::RGBToHSV ( Image< uint8_t > &  cimg  )  [protected]

Conversion of images from RGB to HSV.

Conversion of images from RGB to HSV

Parameters:
cimg RGB image to convert to HSV

Definition at line 1409 of file fgbgsegment.cpp.

void FgBgSegment::SetGradWeight ( float  val  ) 

Set gradient weight Flag.

Definition at line 1499 of file fgbgsegment.cpp.

void FgBgSegment::SetNewForeground ( Image< uint8_t > &  mask,
Image< float > &  dimg,
int  drange,
bool  reuseLast = false 
)

Set new foreground hypothesis.

Reinitialize the foreground disparity model based on mask

Parameters:
mask Binary mask
dimg Disparity image on which initialisation is based
drange_ Disparity range
reuseLast Whether or not to re-use already existing foreground hypothesis

Definition at line 1157 of file fgbgsegment.cpp.

void FgBgSegment::SetNewForeground ( int  startx,
int  starty,
Image< float > &  dimg,
int  drange_ 
)

Set new foreground hypothesis.

Reinitialize the foreground disparity model based on pixel position

Parameters:
startx X-coordinate of ellipse used for initialization
starty Y-coordinate of ellipse used for initialization
dimg Disparity image on which initialisation is based
drange_ Disparity range

Definition at line 1119 of file fgbgsegment.cpp.

void FgBgSegment::SetUniform ( bool  val  ) 

Set uniform Flag.

Definition at line 1478 of file fgbgsegment.cpp.

void FgBgSegment::SetWithColorHoles ( bool  val  ) 

Set withColorHoles Flag.

Definition at line 1471 of file fgbgsegment.cpp.

void FgBgSegment::SetWithColors ( bool  val  ) 

Set withColors Flag.

Definition at line 1464 of file fgbgsegment.cpp.

void FgBgSegment::SetWithDisparities ( bool  val  ) 

Set withDisparities Flag.

Definition at line 1492 of file fgbgsegment.cpp.

void FgBgSegment::SetWithSurface ( bool  val  ) 

Set withSurface Flag.

Definition at line 1485 of file fgbgsegment.cpp.

void FgBgSegment::UseGPU ( bool  gpuopt = true  ) 

Whether or not to use the GPU based belief propagation.

Definition at line 86 of file fgbgsegment.cpp.


Friends And Related Function Documentation

friend class CudaSegment [friend]

Definition at line 108 of file fgbgsegment.h.


Member Data Documentation

float FgBgSegment::ballSize [protected]

Definition at line 296 of file fgbgsegment.h.

std::vector<ColorModel> FgBgSegment::colorPriors [protected]

Prior color models.

Definition at line 283 of file fgbgsegment.h.

CUDA based segmentation object.

Definition at line 299 of file fgbgsegment.h.

Image<float>* FgBgSegment::disparities [protected]

Current disparity data.

Definition at line 281 of file fgbgsegment.h.

int FgBgSegment::drange [protected]

Disparity Range.

Definition at line 290 of file fgbgsegment.h.

const float FgBgSegment::eps = 1e-6f [static, private]

Definition at line 111 of file fgbgsegment.h.

std::vector<Foreground*> FgBgSegment::figures [protected]

Foreground model.

Definition at line 272 of file fgbgsegment.h.

bool FgBgSegment::gpuopt [protected]

Whether GPU optimization is used.

Definition at line 301 of file fgbgsegment.h.

float FgBgSegment::gradWeight [protected]

Gradient Importance Weight.

Definition at line 292 of file fgbgsegment.h.

Image<uint8_t> FgBgSegment::grey [protected]

Grey image data.

Definition at line 279 of file fgbgsegment.h.

Background model.

Definition at line 268 of file fgbgsegment.h.

int FgBgSegment::height [protected]

Image height.

Definition at line 288 of file fgbgsegment.h.

const int FgBgSegment::hist_size = 12 [static]

number of histogram bins

Definition at line 114 of file fgbgsegment.h.

Image<uint8_t> FgBgSegment::hue [protected]

Hue image data.

Definition at line 275 of file fgbgsegment.h.

Image<uint8_t> FgBgSegment::saturation [protected]

Saturation image data.

Definition at line 277 of file fgbgsegment.h.

Flat surface model.

Definition at line 270 of file fgbgsegment.h.

bool FgBgSegment::uniform [protected]

Definition at line 263 of file fgbgsegment.h.

int FgBgSegment::verbose [protected]

Amount of status output.

Definition at line 265 of file fgbgsegment.h.

int FgBgSegment::width [protected]

Image width.

Definition at line 286 of file fgbgsegment.h.

float FgBgSegment::windowSize [protected]

For controlling rough size of initialisation region around point.

Definition at line 295 of file fgbgsegment.h.

bool FgBgSegment::withColorHoles [protected]

Whether data has incomplete color information.

Definition at line 259 of file fgbgsegment.h.

bool FgBgSegment::withColors [protected]

Whether to use colour cue.

Definition at line 255 of file fgbgsegment.h.

bool FgBgSegment::withDisparities [protected]

Whether to use disparity cue.

Definition at line 257 of file fgbgsegment.h.

bool FgBgSegment::withSurface [protected]

Whether to use surface model.

Definition at line 253 of file fgbgsegment.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends Defines


active_realtime_segmentation
Author(s): Mårten Björkman. Maintained by Jeannette Bohg
autogenerated on Tue Mar 5 14:01:56 2013