Classes | Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Private Attributes | Friends
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 (int startx, int starty, Image< float > &dimg, int drange_)
 Set new foreground hypothesis.
void SetNewForeground (Image< uint8_t > &mask, Image< float > &dimg, int drange, bool reuseLast=false)
 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:
widthWidth of the Image
heightHeight of the Image
drangeDisparity range
gradWeightGradient Importance Weight

Definition at line 52 of file fgbgsegment.cpp.

Definition at line 78 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:
allPointsWhether to use all points to create histograms or only those in the disparity range

Definition at line 1112 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:
imageImage to segment
dispDisparity Image
initializeWhether or not to reinitialise the models
loopsHow many iterations per image
startxnot used
startynot used

Definition at line 1605 of file fgbgsegment.cpp.

Get current gradient weight Flag.

Definition at line 1505 of file fgbgsegment.cpp.

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

Definition at line 1453 of file fgbgsegment.cpp.

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

Get Surface Parameters from current estimation.

Definition at line 1442 of file fgbgsegment.cpp.

Get uniform Flag.

Definition at line 1484 of file fgbgsegment.cpp.

Get withColorHoles Flag.

Definition at line 1477 of file fgbgsegment.cpp.

Get withColors Flag.

Definition at line 1470 of file fgbgsegment.cpp.

Get withDisparities Flag.

Definition at line 1498 of file fgbgsegment.cpp.

Get withSurface Flag.

Definition at line 1491 of file fgbgsegment.cpp.

void FgBgSegment::InitSegmentation ( ) [protected]

Initialise the segmentation.

Definition at line 596 of file fgbgsegment.cpp.

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

Dump Segmentation Image.

Dump Bordered Segmentation Image to a file segm*.ppm

Parameters:
imageRGB image to be overlayed with segmentation border

Definition at line 1553 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:
imageBinary image to be Dumped
valIntensity value of the segmentation mask
objID of foreground hypothesis

Definition at line 1534 of file fgbgsegment.cpp.

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

Dump Segmentation Image.

Dump Segmentation Image to a file segm*.pgm

Parameters:
imageGray-level image to be Dumped

Definition at line 1507 of file fgbgsegment.cpp.

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

CPU based segmentation object.

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

Parameters:
segmSegmentation object

Definition at line 1232 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:
cimgRGB image to convert to HSV

Definition at line 1410 of file fgbgsegment.cpp.

void FgBgSegment::SetGradWeight ( float  val)

Set gradient weight Flag.

Definition at line 1500 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:
startxX-coordinate of ellipse used for initialization
startyY-coordinate of ellipse used for initialization
dimgDisparity image on which initialisation is based
drange_Disparity range

Definition at line 1120 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:
maskBinary mask
dimgDisparity image on which initialisation is based
drange_Disparity range
reuseLastWhether or not to re-use already existing foreground hypothesis

Definition at line 1158 of file fgbgsegment.cpp.

Set uniform Flag.

Definition at line 1479 of file fgbgsegment.cpp.

Set withColorHoles Flag.

Definition at line 1472 of file fgbgsegment.cpp.

Set withColors Flag.

Definition at line 1465 of file fgbgsegment.cpp.

Set withDisparities Flag.

Definition at line 1493 of file fgbgsegment.cpp.

Set withSurface Flag.

Definition at line 1486 of file fgbgsegment.cpp.

void FgBgSegment::UseGPU ( bool  gpuopt = true)

Whether or not to use the GPU based belief propagation.

Definition at line 87 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.

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.

Foreground model.

Definition at line 272 of file fgbgsegment.h.

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.

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.

Whether data has incomplete color information.

Definition at line 259 of file fgbgsegment.h.

Whether to use colour cue.

Definition at line 255 of file fgbgsegment.h.

Whether to use disparity cue.

Definition at line 257 of file fgbgsegment.h.

Whether to use surface model.

Definition at line 253 of file fgbgsegment.h.


The documentation for this class was generated from the following files:


active_realtime_segmentation
Author(s): Mårten Björkman. Maintained by Jeannette Bohg
autogenerated on Fri Jan 3 2014 12:02:50