LabelMarkers

Labels markers in image with different values.

Syntax

IppStatus ippiLabelMarkers_8u_C1IR(Ipp8u* pMarker, int markerStep, IppiSize roiSize, int minLabel, int maxLabel, IppiNorm norm, int* pNumber, Ipp8u* pBuffer);

IppStatus ippiLabelMarkers_16u_C1IR(Ipp16u* pMarker, int markerStep, IppiSize roiSize, int minLabel, int maxLabel, IppiNorm norm, int* pNumber, Ipp8u* pBuffer);

Parameters

pMarker
Pointer to the source and destination image ROI.
markerStep
Distance in bytes between starts of consecutive lines in the source and destination image.
minLabel
Minimal value of the marker label (0 < minLabel maxLabel).
maxLabel
Maximal value of the marker label (minLabel maxLabel < 255 for 8-bit markers, and minLabel maxLabel < 65535 for 16-bit markers).
roiSize
Size of the source and destination image ROI in pixels.
norm
Specifies type of the norm to form the mask for marker propagation:

ippiNormInf

Infinity norm (8-connectivity);

ippiNormL1

L1 norm (4-connectivity).
pNumber
Pointer to the number of markers.
pBuffer
Pointer to the working buffer.

Description

The function ippiLabelMarkers is declared in the ippcv.h It operates with ROI (see Regions of Interest in Intel IPP ).

This function labels markers in the image pSrcDst with different integer values. Each connected set of non-zero image pixels is treated as the separate marker. 4- or 8-connectivity can be used depending on the norm type. All pixels belonging to the same marker are set to the same value from the interval [minLabel, maxLabel]. Two markers can be labeled with the same value if the number of connected components exceeds minLabel-maxLabel+1. The image with labeled markers can be used as the seed image for segmentation by functions ippiSegmentWatershed or ippiSegmentGradient functions.

The function requires the working buffer pBuffer whose size should be computed by the function ippiLabelMarkersGetBufferSize beforehand.

Return Values

ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with zero or negative value.

ippStsStepErr

Indicates an error condition if markerStep is less than roiSize.width * < pixelSize>.

ippStsNotEvenStepErr

Indicates an error condition if markerStep for 16-bit images is not divisible by 2.

ippStsBadArgErr

Indicates an error condition if one of the minLabel, maxLabel, and norm has an illegal value.

Submit feedback on this help topic

Copyright © 2000 - 2011, Intel Corporation. All rights reserved.