Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
4 Views

Find clusters of integers?

Hi, I'm interested in some functions that I cant seem to find in IPP. I dont know if it's the correct place to look for these either. I'm probably not using the correct mathematical terms now, but I think you'll see what I mean.
1. Im interested in a function that can find coherent clusters of integers in an integer vector or matrix. That is I have a vector with numbers [0, 0, 0, 1, 1, 1, 1, 2, 3, 3, 2] and I have the integer 1 and a threshold of 2. I would like to find the clusters of ones larger than 2 items in above vector.
2. I would like to be able to create a mask vector or matrix from a scalar number. I have a vector [0, 1, 2, 3, 1, 1, 2, 1] and a scalar 1. When calling this function I would like it to return the vector [0, 1, 0, 0, 1, 1, 0, 1].
3. I want to use the above mask vector or matrix of zeros and ones and apply a function to all elements of another vector at the indices of the ones in the mask vector.
Is any of the above cases supported in these libraries?
Best regards
Richard
0 Kudos
1 Reply
Highlighted
Employee
4 Views

Hi Richard,

It seems noobvious IPP function which can for such kind of operation. Can i understand the operation isfrom data mining?is these operation related to a some known algorithm for example, Haar classifier, watershed image segmentationetc.

Just share some i can suggest,

1) the operation is like image segementation. what's output you may check IPPi manual and see computer vision section. The operations may becompleted by ippiThreshold_LT, or ippiLabelMarkers.

2)seems use ippiThreshold_x or ippiThreshold_LTValGTVal can do this

3) some of ipp function support Mask operation. for example,ippiCopy , which can copy one array to another arrayaccording to theMask (0,don't copyand 1 copy) .
Operation on masked pixels only
IppStatus ippiCopy_(const Ipp* pSrc, int srcStep,
Ipp* pDst, int dstStep, IppiSize roiSize,const Ipp8u* pMask, int
maskStep);

Best Regards
Ying

0 Kudos