Functions | |
cvbres_t | LabelMarker (IMG ImgMarker, cvbval_t MinLabel, cvbval_t MaxLabel, TSegmentationNorm Norm, cvbdim_t &NumLabels, IMG &ImgLabelled) |
This method labels markers in the source image ImgMarker with different integer values. More... | |
cvbres_t | SegmentGradient (IMG ImgIn, TSegmentationNorm Norm, TSegmentationBorder Border, IMG ImgMarker, cvbdim_t Threshold, IMG &ImgOut) |
This method performs segmentation by region growing to the least gradient direction. More... | |
cvbres_t | SegmentWatershed (IMG ImgIn, TWatershedNorm Norm, TWatershedSegmentation Segmentation, TSegmentationBorder Border, IMG ImgMarker, cvbdim_t Threshold, IMG &ImgOut) |
This method performs watershed segmentation with markers. More... | |
cvbres_t LabelMarker | ( | IMG | ImgMarker, |
cvbval_t | MinLabel, | ||
cvbval_t | MaxLabel, | ||
TSegmentationNorm | Norm, | ||
cvbdim_t & | NumLabels, | ||
IMG & | ImgLabelled | ||
) |
This method labels markers in the source image ImgMarker with different integer values.
Each connected set of non-zero image pixels is treated as a separate marker. All pixels belonging to the same marker are set to the same value from the interval [MinLabel, MaxLabel]. Two markers can be labelled with the same value if the number of connected components exceeds MinLabel - MaxLabel + 1.
[in] | ImgMarker | Handle of input image to be labelled. |
[in] | MinLabel | Minimum value of the marker label (0 < MinLabel <= MaxLabel). |
[in] | MaxLabel | Maximum value of the marker label (MinLabel <= MaxLabel < 255 for 8-bit markers, and MinLabel <= MaxLabel < 65535 for 16-bit markers). values see #TWatershedSegmentation. |
[in] | Norm | Norm to form the mask for marker propagation. Either 4- or 8-connectivity can be used depending on the norm type. See #TSegmentationNorm for possible values. |
[out] | NumLabels | Number of labelled regions. |
[out] | ImgLabelled | Image handle of labelled image. |
cvbres_t SegmentGradient | ( | IMG | ImgIn, |
TSegmentationNorm | Norm, | ||
TSegmentationBorder | Border, | ||
IMG | ImgMarker, | ||
cvbdim_t | Threshold, | ||
IMG & | ImgOut | ||
) |
This method performs segmentation by region growing to the least gradient direction.
This function performs image segmentation by region growing with markers. Non-zero pixels of ImgMarker belong to initial image regions. Marker values propagate through the whole image in the direction of the least value of the absolute value of the image gradient.
Image segments are formed by groups of connected ImgMarker pixels with the same value.
[in] | ImgIn | Handle of input image to be segmented. |
[in] | Norm | Controls the marker propagation connectivity. See #TSegmentationNorm for possible values. |
[in] | Border | Border to be applied to the segments. See #TSegmentationBorder for possible values. Note: The pixels between image segments are marked with the value 254. The maximum possible value (255) is used internally and can not used to mark segments. |
[in] | ImgMarker | Marker image which is needed to perform gradient segmentation. If NULL is specified, the marker image is created automatically using morphological reconstruction. |
[in] | Threshold | Threshold which is applied for marker creation. This value is only used if ImgMarker is NULL . |
[out] | ImgOut | Image handle of segmented image. |
cvbres_t SegmentWatershed | ( | IMG | ImgIn, |
TWatershedNorm | Norm, | ||
TWatershedSegmentation | Segmentation, | ||
TSegmentationBorder | Border, | ||
IMG | ImgMarker, | ||
cvbdim_t | Threshold, | ||
IMG & | ImgOut | ||
) |
This method performs watershed segmentation with markers.
The watershed segmentation is preferable for images with local minimums, for example, gradient images. Image markers generally correspond to the local minimums and can be created, for example, manually or using morphological reconstruction.
Non-zero pixels of ImgMarker image belong to water source markers. Marker values propagate through the whole image according to the watershed algorithm. Image segments are formed by groups of connected ImgMarker pixels with the same value.
[in] | ImgIn | Handle of input image to be segmented. |
[in] | Norm | Controls the marker propagation connectivity. See #TWatershedNorm for more information. |
[in] | Segmentation | Specifies the algorithm of segmentation. For possible values see #TWatershedSegmentation. |
[in] | Border | Border to be applied to the segments. See #TSegmentationBorder for possible values. |
[in] | ImgMarker | Marker image which is needed to perform watershed segmentation. If NULL is specified, the marker image is created automatically using morphological reconstruction. |
[in] | Threshold | Threshold which is applied for marker creation. This value is only used if ImgMarker is NULL . |
[out] | ImgOut | Image handle of segmented image. |