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

alternative for IPP 6.1 method ippsNthMaxElement() in IPP 9.0

I am porting my code from IPP 6.1 to IPP 9.0. I need to calculate nth max value from a 32F image. As ippsNthMaxElement() from IPP 6.1 is deprecated, I tried writing my own method to get this functionality, but it hampers speed of the code. Is there any better alternative available in IPP 9.0 OR MKL? I want to avoid sorting the elements completely, so is there any method that can allow me to partially sort the elements and get the Nth max element ?
0 Kudos
2 Replies
Highlighted
Valued Contributor II
18 Views

>>...I want to avoid sorting the elements completely, so is there any method that can allow me to partially sort the elements and >>get the Nth max element? Try to look at how a Merge Sort algorithm is working. It is a recursive algorithm and during its merging phase it has partially sorted blocks of data. Number of partially sorted blocks of data depends on a current level of recursion.
0 Kudos
Highlighted
Beginner
18 Views

Hi, A workaround, for NthMaxElement, i'm using sortRadixDescend() method from IPP 9.0 and picking the nth element from sorted output. Hope that helps someone.
0 Kudos