Classes | Functions
largest.cpp File Reference
#include <vector>
#include <xmmintrin.h>
#include "largest.h"
Include dependency graph for largest.cpp:

Go to the source code of this file.

Classes

struct  Cluster
 Cluster class. More...

Functions

int FindConnectedComponents (std::vector< short > &equivTable, int maxClusters, Image< unsigned char > &limg, Image< short > &comp, int label)
 Find connected components.
void KeepLargestSegment (Image< unsigned char > &segment, int fromLabel, int toLabel, int minArea)
 Keep the largest segment.
void Relabel (Image< short > &comp, std::vector< short > &equivTable, int numClusters, std::vector< Cluster > &clusters)
 Relabel all clusters and fill their attributes.

Detailed Description

Implementations of utility functions to clean segment

Definition in file largest.cpp.


Function Documentation

int FindConnectedComponents ( std::vector< short > &  equivTable,
int  maxClusters,
Image< unsigned char > &  limg,
Image< short > &  comp,
int  label 
)

Find connected components.

Find connected components in segmentation which is later used to keep the largest component

Parameters:
equivTableEquivalence table for different clusters
maxClustersMaximum Number of Clusters
limgSegmentation mask to be clustered
compResult image with components
labelThe label of the segmentation mask
Returns:
Number of Connected Components

Definition at line 61 of file largest.cpp.

void KeepLargestSegment ( Image< unsigned char > &  segment,
int  fromLabel,
int  toLabel,
int  minArea = 0 
)

Keep the largest segment.

Keep the largest component of the segmentation

Parameters:
segmentImage with segment
fromLabelThe label of the segment to clean
toLabelThe label to which all non large labels are set
minAreaMinimum area of components

Definition at line 278 of file largest.cpp.

void Relabel ( Image< short > &  comp,
std::vector< short > &  equivTable,
int  numClusters,
std::vector< Cluster > &  clusters 
)

Relabel all clusters and fill their attributes.

Fill the area and bounding box attributes of the clusters

Parameters:
compConnected component image
equivTableEquivalence table
numClustersNumber of connected components
clustersVector with cluster objects

Definition at line 204 of file largest.cpp.

 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 Wed Jan 23 2013 15:46:44