Marker class.
More...
#include <Marker.h>
|
Mat | drawVector (const Mat &potential, byte flag) const |
|
Mat | drawMatrix (const Mat &potential, byte flag) const |
|
Mat | drawVoxel (const Mat &potential, byte flag) const |
|
template<typename T > |
void | drawSquare (Mat &img, byte x, byte y, const Scalar &color, T val, double fontScale=1.0, byte textProp=0) const |
|
void | drawRectangle (Mat &img, Point pt1, Point pt2, const Scalar &color, float val, double fontScale=1.0, byte textProp=TP_CENTER) const |
|
void | drawRectangle (Mat &img, Point pt1, Point pt2, const Scalar &color, const std::string &str=std::string(), double fontScale=1.0, byte textProp=TP_CENTER) const |
|
| CMarker (const CMarker &)=delete |
|
const CMarker & | operator= (const CMarker &)=delete |
|
Marker class.
This class allows to visualize the results of graphical models decoding
- Author
- Sergey G. Kosov, serge.nosp@m.y.ko.nosp@m.sov@p.nosp@m.roje.nosp@m.ct-10.nosp@m..de
Definition at line 78 of file Marker.h.
◆ textProp
Enumerator |
---|
TP_CENTER | |
TP_LEFT | |
TP_RIGHT | |
TP_TOP | |
TP_BOTTOM | |
TP_PERCENT | |
Definition at line 80 of file Marker.h.
◆ CMarker() [1/3]
Constructor with a default palette.
- Parameters
-
Definition at line 14 of file Marker.cpp.
◆ CMarker() [2/3]
DirectGraphicalModels::vis::CMarker::CMarker |
( |
const vec_nColor_t & |
vPalette | ) |
|
Constructor with a custom palette.
- Parameters
-
vPalette | Custom palette. It is represented as a std::vector of the custom entries of type:std::make_pair(CV_RGB(r, g, b), "class name"). For optimal performance, class name should have maximal 10 symbols. |
Definition at line 34 of file Marker.cpp.
◆ ~CMarker()
DirectGraphicalModels::vis::CMarker::~CMarker |
( |
void |
| ) |
|
|
virtual |
◆ CMarker() [3/3]
DirectGraphicalModels::vis::CMarker::CMarker |
( |
const CMarker & |
| ) |
|
|
privatedelete |
◆ drawConfusionMatrix()
Mat DirectGraphicalModels::vis::CMarker::drawConfusionMatrix |
( |
const Mat & |
confusionMat, |
|
|
byte |
flag = 0 |
|
) |
| const |
Visualizes a confusion matrix.
This function visualizes a confusion matrix, where gthe values are given in percents ofthe overall number of estimated samples. The function additionally computes and visualizes the recall and precision values for each class. If the flag MARK_PERCLASS is set, the classification rate per each class is visualized, and the recall and precision values are not computed.
- Parameters
-
confusionMat | Confusion matrix: Mat of type: CV_32FC1 |
flag | Mapping flag (Ref. mark_flags) |
- Returns
- Figure with visualized confusion matrix
Definition at line 86 of file Marker.cpp.
◆ drawMatrix()
Mat DirectGraphicalModels::vis::CMarker::drawMatrix |
( |
const Mat & |
potential, |
|
|
byte |
flag |
|
) |
| const |
|
private |
◆ drawPotentials()
Mat DirectGraphicalModels::vis::CMarker::drawPotentials |
( |
const Mat & |
potential, |
|
|
byte |
flag = 0 |
|
) |
| const |
Visualizes the potentials.
Draws <node / edge / triplet> [potential / prior] <vector / matrix / voxel>
This function is also suit for the confusion matrix visualization, but function drawConfusionMatrix() is more preferable for such task
- Parameters
-
potential | Node, edge or triplet potential or prior. One, two or tree dimensional Mat of type: CV_32FC1 |
flag | Mapping flag (Ref. mark_flags) |
- Returns
- Figure with visualized potential or prior
- Note
- This function curently does not support triplet [potential / prior] voxels
Definition at line 76 of file Marker.cpp.
◆ drawRectangle() [1/2]
void DirectGraphicalModels::vis::CMarker::drawRectangle |
( |
Mat & |
img, |
|
|
Point |
pt1, |
|
|
Point |
pt2, |
|
|
const Scalar & |
color, |
|
|
float |
val, |
|
|
double |
fontScale = 1.0 , |
|
|
byte |
textProp = TP_CENTER |
|
) |
| const |
|
private |
◆ drawRectangle() [2/2]
void DirectGraphicalModels::vis::CMarker::drawRectangle |
( |
Mat & |
img, |
|
|
Point |
pt1, |
|
|
Point |
pt2, |
|
|
const Scalar & |
color, |
|
|
const std::string & |
str = std::string() , |
|
|
double |
fontScale = 1.0 , |
|
|
byte |
textProp = TP_CENTER |
|
) |
| const |
|
private |
◆ drawSquare()
template<typename T >
void DirectGraphicalModels::vis::CMarker::drawSquare |
( |
Mat & |
img, |
|
|
byte |
x, |
|
|
byte |
y, |
|
|
const Scalar & |
color, |
|
|
T |
val, |
|
|
double |
fontScale = 1.0 , |
|
|
byte |
textProp = 0 |
|
) |
| const |
|
private |
◆ drawVector()
Mat DirectGraphicalModels::vis::CMarker::drawVector |
( |
const Mat & |
potential, |
|
|
byte |
flag |
|
) |
| const |
|
private |
◆ drawVoxel()
Mat DirectGraphicalModels::vis::CMarker::drawVoxel |
( |
const Mat & |
potential, |
|
|
byte |
flag |
|
) |
| const |
|
private |
◆ markClasses()
void DirectGraphicalModels::vis::CMarker::markClasses |
( |
Mat & |
base, |
|
|
const Mat & |
classes, |
|
|
byte |
flag = 0 |
|
) |
| const |
Visualizes the classes.
Draws the classes image on base image.
- Parameters
-
[in,out] | base | Base image on which the classes will be mapped. Image of type: CV_8UC3. May be empty. |
[in] | classes | Class map image. Image of type: CV_8UC1. |
[in] | flag | Mapping flag (Ref. mark_flags). |
Definition at line 43 of file Marker.cpp.
◆ operator=()
const CMarker& DirectGraphicalModels::vis::CMarker::operator= |
( |
const CMarker & |
| ) |
|
|
privatedelete |
◆ bkgIntencity
const byte DirectGraphicalModels::vis::CMarker::bkgIntencity = 222 |
|
staticprivate |
◆ ds
const int DirectGraphicalModels::vis::CMarker::ds = 70 |
|
staticprivate |
◆ frgIntensity
const byte DirectGraphicalModels::vis::CMarker::frgIntensity = 255 |
|
staticprivate |
◆ m_vPalette
vec_nColor_t DirectGraphicalModels::vis::CMarker::m_vPalette |
|
protected |
Pointer to the container with the palette.
Definition at line 136 of file Marker.h.
The documentation for this class was generated from the following files: