1 #ifndef CONNECTED_COMPONENTS_H 2 #define CONNECTED_COMPONENTS_H 30 valarray<int> compactLabeling ();
43 vector<int> labeling ();
51 void uf_union (
int x,
int y, vector<int>& parent);
60 int uf_find (
int x, vector<int> parent, vector<int>& label);
66 void constructBinaryImages (
int robotsLabel);
73 valarray<float> NormalizedEuclideanDistanceBinary (
bool RobotR);
83 void DT1D (vector<float> f, vector<float>& d, vector<int>& v , vector<float>& z);
91 vector<float> getVector (valarray<float> A,
int row);
134 #endif // CONNECTED_COMPONENTS_H valarray< int > BinaryRobot
Binary array of the label assigned to a robot.
vector< int > image
The image to perform the labeling on.
Use row-by-row labeling algorithm to label connected components. The algorithm makes two passes over ...
int cols
Number of columns of the image.
int rows
Number of rows of the image.
valarray< int > label2d
Array of labels.
bool zeroAsBg
Whether 0 should be considered or not.
valarray< int > BinaryNonRobot
Binary array of the labels not assigned to a robot.