Allows to read out a list of graphs which are not connected (forests) out of a single channel 8bit cv::Mat. More...
#include <ImageForest.h>
Classes | |
class | Graph |
Describes the properties of a graph. More... | |
class | Point |
A pixel point in the ImageForest. More... | |
Public Member Functions | |
double | CallculateEdgyness () |
Callculates a value that describes the edgyness the image (currently bugged, DON'T USE) WARNING THIS FUNCTION IS CURRENTLY BUGGED AND NOT BEEING USED. | |
double | CallculateGraphMass () |
Callculates pixels with graphs to pixels without graphs ratio. | |
cv::Mat | GenerateImage () |
Generates a color matrix which visualizes the graphs. | |
void | GenerateImage (cv::Mat &mat) |
Generates a color matrix which visualizes the graphs. | |
int | GetGraphId (int x, int y) |
Returns the id of the graph in this pixel position. If there is no graph there, this will return 0. | |
int | GetGraphId (ImageForest::Point point) |
Returns the id of the graph in this pixel position. If there is no graph there, this will return 0. | |
std::map< int, Graph > | GetGraphs () |
Returns the graphs informations. | |
int | Height () |
Returns the pixel height. | |
ImageForest () | |
Constructor for an empty image forest. | |
ImageForest (const cv::Mat &mat, unsigned char threshold) | |
Constructs a image forest mono8 image. | |
int | NumGraphs () |
void | ReadFromImage (const cv::Mat &mat, unsigned char threshold) |
Constructs a image forest mono8 image (discards the old one) | |
int | Width () |
Returns the pixel width. | |
virtual | ~ImageForest () |
Deconstructor. | |
Private Member Functions | |
void | M_GetVectors (int x, int y, std::vector< ImageForest::Point > &vectors) |
void | M_SetEqClass (int *eqMap, int size, int a, int b) |
Private Attributes | |
int | m_count |
int | m_height |
int | m_lastId |
int * | m_values |
int | m_width |
Allows to read out a list of graphs which are not connected (forests) out of a single channel 8bit cv::Mat.
Definition at line 15 of file ImageForest.h.
Constructor for an empty image forest.
Definition at line 17 of file ImageForest.cpp.
face_contour_detector::ImageForest::ImageForest | ( | const cv::Mat & | mat, |
unsigned char | threshold | ||
) |
Constructs a image forest mono8 image.
mat | the image from which the graphs are callculated |
threshold | the threshold value after which a point the image is considered a point |
Definition at line 21 of file ImageForest.cpp.
face_contour_detector::ImageForest::~ImageForest | ( | ) | [virtual] |
Deconstructor.
Definition at line 25 of file ImageForest.cpp.
Callculates a value that describes the edgyness the image (currently bugged, DON'T USE) WARNING THIS FUNCTION IS CURRENTLY BUGGED AND NOT BEEING USED.
Definition at line 289 of file ImageForest.cpp.
Callculates pixels with graphs to pixels without graphs ratio.
Definition at line 330 of file ImageForest.cpp.
Generates a color matrix which visualizes the graphs.
Generates an matrix which visualizes the.
Definition at line 161 of file ImageForest.cpp.
void face_contour_detector::ImageForest::GenerateImage | ( | cv::Mat & | mat | ) |
Generates a color matrix which visualizes the graphs.
mat | the mat into which the result is beeing written |
Definition at line 168 of file ImageForest.cpp.
int face_contour_detector::ImageForest::GetGraphId | ( | int | x, |
int | y | ||
) | [inline] |
Returns the id of the graph in this pixel position. If there is no graph there, this will return 0.
x | the x coordinate |
y | the y coordinate |
Definition at line 122 of file ImageForest.h.
int face_contour_detector::ImageForest::GetGraphId | ( | ImageForest::Point | point | ) | [inline] |
Returns the id of the graph in this pixel position. If there is no graph there, this will return 0.
point | the position |
Definition at line 128 of file ImageForest.h.
std::map< int, ImageForest::Graph > face_contour_detector::ImageForest::GetGraphs | ( | ) |
Returns the graphs informations.
Definition at line 213 of file ImageForest.cpp.
int face_contour_detector::ImageForest::Height | ( | ) | [inline] |
Returns the pixel height.
Definition at line 130 of file ImageForest.h.
void face_contour_detector::ImageForest::M_GetVectors | ( | int | x, |
int | y, | ||
std::vector< ImageForest::Point > & | vectors | ||
) | [inline, private] |
Definition at line 136 of file ImageForest.h.
void face_contour_detector::ImageForest::M_SetEqClass | ( | int * | eqMap, |
int | size, | ||
int | a, | ||
int | b | ||
) | [private] |
Definition at line 345 of file ImageForest.cpp.
int face_contour_detector::ImageForest::NumGraphs | ( | ) | [inline] |
Return a the number of found graphs
Definition at line 121 of file ImageForest.h.
void face_contour_detector::ImageForest::ReadFromImage | ( | const cv::Mat & | mat, |
unsigned char | threshold | ||
) |
Constructs a image forest mono8 image (discards the old one)
mat | the image from which the graphs are callculated |
threshold | the threshold value after which a point the image is considered a point |
Definition at line 29 of file ImageForest.cpp.
int face_contour_detector::ImageForest::Width | ( | ) | [inline] |
Returns the pixel width.
Definition at line 129 of file ImageForest.h.
int face_contour_detector::ImageForest::m_count [private] |
Definition at line 112 of file ImageForest.h.
int face_contour_detector::ImageForest::m_height [private] |
Definition at line 109 of file ImageForest.h.
int face_contour_detector::ImageForest::m_lastId [private] |
Definition at line 111 of file ImageForest.h.
int* face_contour_detector::ImageForest::m_values [private] |
Definition at line 113 of file ImageForest.h.
int face_contour_detector::ImageForest::m_width [private] |
Definition at line 108 of file ImageForest.h.