76 float xMin,
float xMax,
float yMin,
float yMax,
float zMin=-10000,
float zMax=10000);
100 core::Img8u &maskImage,
int radius,
float euclideanDistance,
int numSurfaces);
111 core::Img8u &maskImage,
int radius,
float euclideanDistance,
int numSurfaces);
123 core::Img8u &maskImage,
int radius,
float euclideanDistance,
int numSurfaces);
166 core::Img8u &maskImage,
int radius,
float euclideanDistance,
int numSurfaces,
bool pointAssignment);
169 core::Img8u &maskImage,
int radius,
float euclideanDistance,
int numSurfaces,
bool pointAssignment);
std::vector< std::vector< int > > extractSegments(core::Img32s &labelImage)
Extracts the segments from a label image.
ICLIO_API void labelImage(core::ImgBase *image, const std::string &label)
draws a label into the upper left image corner
~SegmenterUtils()
Destructor.
core::Img32s stabelizeSegmentation(core::Img32s &labelImage)
Minimizes the label ID changes from frame to frame. The overlaps between the current and the previous...
math::DynMatrix< bool > edgePointAssignmentAndAdjacencyMatrixCPU(core::DataSegment< float, 4 > &xyzh, core::Img32s &labelImage, core::Img8u &maskImage, int radius, float euclideanDistance, int numSurfaces, bool pointAssignment)
undocument this line if you encounter any issues!
Definition: Any.h:37
math::DynMatrix< bool > edgePointAssignmentAndAdjacencyMatrixCL(core::DataSegment< float, 4 > &xyzh, core::Img32s &labelImage, core::Img8u &maskImage, int radius, float euclideanDistance, int numSurfaces, bool pointAssignment)
void createColorImageCL(core::Img32s &labelImage, core::Img8u &colorImage)
SegmenterUtils(Mode mode=BEST)
Constructor.
float norm3(const Vec4 &a)
3D- euclidian norm for 4D homogeneous vectors (ignoring the homegeneous component)
Definition: HomogeneousMath.h:174
Mode
Definition: SegmenterUtils.h:46
math::DynMatrix< bool > edgePointAssignmentAndAdjacencyMatrix(core::DataSegment< float, 4 > &xyzh, core::Img32s &labelImage, core::Img8u &maskImage, int radius, float euclideanDistance, int numSurfaces)
Calculates the adjacency between segments and assigns the edge points to the surfaces.
core::Img8u createColorImage(core::Img32s &labelImage)
Creates a color image (e.g. for pointcloud coloring) from a given segmentation label image.
static bool occlusionCheck(core::Img32f &depthImage, utils::Point p1, utils::Point p2, float distanceTolerance=3., float outlierTolerance=5.)
Checks if there is occlusion between two points (depth of all points on or in front of an augmented l...
Size class of the ICL.
Definition: Size.h:61
core::Img8u createROIMask(core::DataSegment< float, 4 > &xyzh, core::Img32f &depthImage, float xMin, float xMax, float yMin, float yMax, float zMin=-10000, float zMax=10000)
Creates the mask image for segmentation (including 3D ROI).
static std::vector< std::vector< int > > createLabelVectors(core::Img32s &labelImage)
Creates the label vectors from a given label image.
core::Img8u createMask(core::Img32f &depthImage)
Creates the mask image for segmentation.
static float dist3(const Vec &a, const Vec &b)
Definition: SegmenterUtils.h:171
math::DynMatrix< bool > calculateAdjacencyMatrix(core::DataSegment< float, 4 > &xyzh, core::Img32s &labelImage, core::Img8u &maskImage, int radius, float euclideanDistance, int numSurfaces)
Calculates the adjacency between segments. Use edgePointAssignmentAndAdjacencyMatrix(....
void createColorImageCPU(core::Img32s &labelImage, core::Img8u &colorImage)
void relabel(core::Img32s &labelImage, std::vector< std::vector< int > > &assignment, int maxOldLabel=0)
Relabels the label image.
Definition: SegmenterUtils.h:46
Definition: SegmenterUtils.h:46
Point class of the ICL used e.g. for the Images ROI offset.
Definition: Point.h:58
void edgePointAssignment(core::DataSegment< float, 4 > &xyzh, core::Img32s &labelImage, core::Img8u &maskImage, int radius, float euclideanDistance, int numSurfaces)
Assigns the edge points to the surfaces. Use edgePointAssignmentAndAdjacencyMatrix(....
Support class for segmentation algorithms.
Definition: SegmenterUtils.h:43
Definition: SegmenterUtils.h:46
std::vector< int > calculateLabelReassignment(int countCur, int countLast, core::Channel32s &labelImageC, core::Channel32s &lastLabelImageC, utils::Size size)
Data * m_data
internal data type
Definition: SegmenterUtils.h:156