About how to use the getList function of class "Algorithm" [closed]

asked 2014-01-22 00:45:00 -0600

claycau gravatar image

updated 2014-01-22 00:53:26 -0600

By use the getList function of class "Algorithm" we can know which algorithm can invoke.But when I use the latest version of opencv the getList result only have one algorithm "CLANE" The code I use as below:


 #include <opencv\cv.h>
#include <opencv\highgui.h>
#include <opencv2\core\core.hpp>
#include <vector>

using namespace std;


int main( int argc, char** argv )
{
    std::vector<cv::String> algorithms;
    cv::Algorithm::getList(algorithms);
    cout << "Algorithms: " << (int)algorithms.size() << endl;
    for (int i=0; i<(int)algorithms.size(); i++) {
        cout << algorithms[i] << endl;
    }

    getchar();
    return 0;
}

=======

Did U have the same problems?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by StevenPuttemans
close date 2014-01-23 06:29:56.223969

Comments

1

try calling initModule_ml(); initModule_features2d(); initModule_video(); initModule_contrib();

before getList

berak gravatar imageberak ( 2014-01-22 04:45:24 -0600 )edit

3Q U :) Look I should try to learn more about opencv, it's really cool~

claycau gravatar imageclaycau ( 2014-01-22 19:33:00 -0600 )edit

As this problem is solved, I will close it down with solution provided.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-01-23 06:29:31 -0600 )edit