Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
ConnectedComponentAnalyzer Class Reference

Detects connected components in an image. More...

#include <ConnectedComponentAnalyzer.h>

List of all members.

Classes

struct  IntensitySimilarity
 a similarity criterion based on intensity differences More...
struct  MaskVadility
 validity function for range image segmentation More...

Public Member Functions

 ConnectedComponentAnalyzer ()
unsigned getImageHeight ()
unsigned getImageWidth ()
unsigned * getLastLabelImage ()
std::vector< ConnectedComponentsegment (unsigned char *binImage, unsigned width, unsigned height, unsigned minSegmentSize=1, float minOccupiedArea=0.0, unsigned expandSegmentSize=0)
std::vector< ConnectedComponentsegment (const float *floatImage, unsigned width, unsigned height, float maxDistance, unsigned minSegmentSize=1, float minOccupiedArea=0.0, unsigned expandSegmentSize=0)
std::vector< ConnectedComponentsegment (const float *floatImage, const unsigned char *mask, unsigned width, unsigned height, float maxDistance, unsigned minSegmentSize=1, float minOccupiedArea=0.0, unsigned expandSegmentSize=0, int maxr=1)
std::vector< ConnectedComponentsegmentByLimit (cv::Mat *pi_img, double pi_limit)
 ~ConnectedComponentAnalyzer ()

Static Public Member Functions

static void isolateLargestSegment (unsigned char *binImage, unsigned width, unsigned height)

Private Member Functions

std::vector< ConnectedComponentextractComponents (unsigned max_label, unsigned minSegmentSize, float minOccupiedArea, unsigned expandSegmentSize)

Private Attributes

unsigned m_Height
unsigned * m_LabelImage
unsigned m_Width

Detailed Description

Detects connected components in an image.

Author:
Johannes Pellenz, Patrick Lamprecht (RX), David Gossow (RX)

Definition at line 25 of file ConnectedComponentAnalyzer.h.


Constructor & Destructor Documentation

Does nothing.

Does nothing.


Member Function Documentation

std::vector<ConnectedComponent> ConnectedComponentAnalyzer::extractComponents ( unsigned  max_label,
unsigned  minSegmentSize,
float  minOccupiedArea,
unsigned  expandSegmentSize 
) [private]

Extract connected components from a label image. Shared code between the different segment() implementations

Parameters:
labelImagelabel image
widthimage width
heightimage height
max_labelmaximum label id
minSegmentSizeminimal segment size (pixels)
expandSegmentSizeexpand the segments with the given size
Returns:
List of the segments with values above the limit

Definition at line 88 of file ConnectedComponentAnalyzer.h.

Definition at line 87 of file ConnectedComponentAnalyzer.h.

Get the label image and dimensions of the last segmentation run.

Definition at line 86 of file ConnectedComponentAnalyzer.h.

static void ConnectedComponentAnalyzer::isolateLargestSegment ( unsigned char *  binImage,
unsigned  width,
unsigned  height 
) [static]

Clear all mask segments except the largest one

std::vector< ConnectedComponent > ConnectedComponentAnalyzer::segment ( unsigned char *  binImage,
unsigned  width,
unsigned  height,
unsigned  minSegmentSize = 1,
float  minOccupiedArea = 0.0,
unsigned  expandSegmentSize = 0 
)

This method extracts segments of an already binarized image and returns a list of the segments containing bounding box, cog, size, etc.

Parameters:
binImagebinarized image
widthwidth of the image
heightheight of the image
minSegmentSizeminimal segment size (pixels)
expandSegmentSizeexpand the segments with the given size
Returns:
List of the segments with values above the limit
Author:
Patrick Lamprecht, David Gossow (RX)
std::vector< ConnectedComponent > ConnectedComponentAnalyzer::segment ( const float *  floatImage,
unsigned  width,
unsigned  height,
float  maxDistance,
unsigned  minSegmentSize = 1,
float  minOccupiedArea = 0.0,
unsigned  expandSegmentSize = 0 
)

This method extracts segments of a range image using single linkage similarity checks between components and component candidates.

Parameters:
rangeImagerange image
widthwidth of the image
heightheight of the image
maxDistancethe similarity threshold (pixels with intensity difference <= maxDistance belong to the same object)
minSegmentSizeminimal segment size (pixels)
expandSegmentSizeexpand the segments with the given size
Returns:
List of the segments with values above the limit
Author:
Nicolai Wojke (R14)
std::vector< ConnectedComponent > ConnectedComponentAnalyzer::segment ( const float *  floatImage,
const unsigned char *  mask,
unsigned  width,
unsigned  height,
float  maxDistance,
unsigned  minSegmentSize = 1,
float  minOccupiedArea = 0.0,
unsigned  expandSegmentSize = 0,
int  maxr = 1 
)
std::vector< ConnectedComponent > ConnectedComponentAnalyzer::segmentByLimit ( cv::Mat *  pi_img,
double  pi_limit 
)

This method first detects pixels in a gray level image that have a value greater equal pi_limit. Then it extracts these segments and returns a list of the segments containing bounding box, center of gravity (cog), size

Parameters:
pi_imgThe pointer to a cv::Mat Gray level image.
pi_limitA pixel is considered to be part of a component if its value is equal or larger than pi_limit.
Returns:
List of the segments with values above the limit
Author:
Johannes Pellenz, David Gossow

Member Data Documentation

Definition at line 149 of file ConnectedComponentAnalyzer.h.

Definition at line 148 of file ConnectedComponentAnalyzer.h.

Definition at line 149 of file ConnectedComponentAnalyzer.h.


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


or_libs
Author(s): Viktor Seib
autogenerated on Tue Jan 7 2014 11:24:03