API implementation changes for OpenCV 3.0 instead of OpenCV 2.4

3.8k Views Asked by At

I'm trying to update from OpenCV2.4.10 to OpenCV3.0.0. OpenCV provides a basic guide for how general APIs work after the update, however, it doesn't cover how to deal with some implementation and API changes that have been removed completely. Is there a definitive guide to this process?

For example, one specific problem I'm encountering is that a library I'm using calls a function that has been removed from OpenCV3:

static CV_IMPLEMENT_QSORT( icvSortDistances, int, CV_LT )

How can I replace CV_IMPLEMENT_QSORT? It appears to be originally defined in cxtypes according to this blog post. There is another similar function of note CV_DECLARE_QSORT, which may also not be in 3.0?

Also several components use the opencv legacy libraries, are there any known or suggested upgrade paths for those?

1

There are 1 best solutions below

0
On

How about replacing it with :

static void icvSortDistances(int *array, size_t total, int )
{
    std::sort(&array[0], &array[total]);
}