The SegmentationTool class is used to generate Chromatic Segmentation.
More...
#include <SegmentationTool.h>
|
enum | BG_FG_ErodeDilate { erode,
dilate,
none
} |
|
|
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 void | chromaticSegmentationMat (cv::Mat ¤tImage, 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) |
|
The SegmentationTool class is used to generate Chromatic Segmentation.
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
-
currentImage | Image to be segmented |
result | Black and white segmentation |
result_c | Colored segmentation (not includes morpholigic operations) |
maskImage | Mask to be used |
m_mask | Tells if the mask is in used |
rangesFG | List of HSV parameters for foreground layers |
rangesBG | List of HSV parameters for background layers |
BGED | Background Erode/Dilate configuration, allows to compute the morphologic operations according with the parameters sets by the user. |
BGSS | Size of the structured element for the background computation. |
FGED | Foreground Erode/Dilate configuration, allows to compute the morphologic operations according with the parameters sets by the user. |
FGSS | Size of the structured element for the foreground computation. |
QImage SegmentationTool::MatToQImage |
( |
const cv::Mat & |
mat | ) |
|
SegmentationTool::MatToQImageAdded for image manipulation.
- Parameters
-
- Returns
- corresponding QImage image
cv::Mat SegmentationTool::qImage2Mat |
( |
const QImage & |
qimage | ) |
|
|
static |
void SegmentationTool::thinningIteration |
( |
cv::Mat & |
im, |
|
|
int |
iter |
|
) |
| |
Perform one thinning iteration. Normally you wouldn't call this function directly from your code.
- Parameters
-
im | Binary image with range = 0-1 |
iter | 0=even, 1=odd |
The documentation for this class was generated from the following files: