Hi All,
I am trying to do some image segmentation, and I am still having some trouble with ippiLabelMarker's implementation even after reading through the documentation and this post: https://software.intel.com/en-us/forums/topic/297054
Here is a snippet of my code:
//get size and allocate memory for buffer int LabelBufferSize; ippiLabelMarkersGetBufferSize_8u_C1R(sizeImg, &LabelBufferSize); Ipp8u* LabelBuffer = ippsMalloc_8u(LabelBufferSize); //Compute Labels int minLabel = 0; int maxLabel = 255; int numLabels; ippiLabelMarkers_16u_C1IR(BinUnsigned, src16Step, sizeImg, minLabel, maxLabel, ippiNormL1, &numLabels, LabelBuffer); std::cout << numLabels << std::endl;
My first argument of the LabelMarkers function is "BinUnsigned", an Ippi16u* binarized image with pixel values of 0 and 254.
Based on the forum post linked above and all the documentation I've read, my understanding is that the LabelMarker image should apply a different label to each continuous section of non-zero values. Is this correct?
I'm seeing the same label applied to sections that are clearly separated by zeros, seemingly just because they have the same value (which will always be 254).
Also, numLabels in the above instance returns 3, even though I verified that there are no other label values in the LabelMarker other than 0 and 254. Can anyone explain to me what's going on there?
Any help would be greatly appreciated, thanks!