VAT  3.0
Video Analysis Tool
Public Types | Public Member Functions | Static Public Member Functions | List of all members
SegmentationTool Class Reference

The SegmentationTool class is used to generate Chromatic Segmentation. More...

#include <SegmentationTool.h>

Public Types

enum  BG_FG_ErodeDilate { erode, dilate, none }
 

Public Member Functions

QImage MatToQImage (const cv::Mat &mat)
 SegmentationTool::MatToQImageAdded for image manipulation. More...
 
void chromaticSegmentation (QImage *currentImage, QImage *result, QImage *result_c, QImage *maskImage, bool m_mask, std::vector< std::vector< int > > rangesFG, std::vector< std::vector< int > > rangesBG, int BGED, int BGSS, int FGED, int FGSS)
 SegmentationTool::chromaticSegmentation HSV segmentation, based on Beetz 2006, which allows to work with foreground and background separately, which allows to make morphologic operations to the separate images, improving the possible segmentation. More...
 
void thinningIteration (cv::Mat &im, int iter)
 
void thinning (cv::Mat &im)
 
int grayHistogram (cv::Mat &image)
 

Static Public Member Functions

static void chromaticSegmentationMat (cv::Mat &currentImage, cv::Mat &result, int minGrade, int maxGrade, int minSaturation, int maxLight)
 
static void chromaticSegmentation (QImage *currentImage, QImage *result, QImage *result_c, QImage *maskImage, bool m_mask, int minGrade, int maxGrade, int minSaturation, int maxLight)
 
static cv::Mat qImage2Mat (const QImage &qimage)
 SegmentationTool::qImage2Mat Added for image manipulation. More...
 
static QImage Mat2QImage (cv::Mat &mat)
 

Detailed Description

The SegmentationTool class is used to generate Chromatic Segmentation.

Member Function Documentation

void SegmentationTool::chromaticSegmentation ( QImage *  currentImage,
QImage *  result,
QImage *  result_c,
QImage *  maskImage,
bool  m_mask,
std::vector< std::vector< int > >  rangesFG,
std::vector< std::vector< int > >  rangesBG,
int  BGED,
int  BGSS,
int  FGED,
int  FGSS 
)

SegmentationTool::chromaticSegmentation HSV segmentation, based on Beetz 2006, which allows to work with foreground and background separately, which allows to make morphologic operations to the separate images, improving the possible segmentation.

Parameters
currentImageImage to be segmented
resultBlack and white segmentation
result_cColored segmentation (not includes morpholigic operations)
maskImageMask to be used
m_maskTells if the mask is in used
rangesFGList of HSV parameters for foreground layers
rangesBGList of HSV parameters for background layers
BGEDBackground Erode/Dilate configuration, allows to compute the morphologic operations according with the parameters sets by the user.
BGSSSize of the structured element for the background computation.
FGEDForeground Erode/Dilate configuration, allows to compute the morphologic operations according with the parameters sets by the user.
FGSSSize of the structured element for the foreground computation.
QImage SegmentationTool::MatToQImage ( const cv::Mat &  mat)

SegmentationTool::MatToQImageAdded for image manipulation.

Parameters
mat
Returns
corresponding QImage image
cv::Mat SegmentationTool::qImage2Mat ( const QImage &  qimage)
static

SegmentationTool::qImage2Mat Added for image manipulation.

Parameters
qimage
Returns
corresponding cv::Mat image
void SegmentationTool::thinningIteration ( cv::Mat &  im,
int  iter 
)

Perform one thinning iteration. Normally you wouldn't call this function directly from your code.

Parameters
imBinary image with range = 0-1
iter0=even, 1=odd

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