Ask Your Question

Revision history [back]

error C2039: 'drawMarker' : is not a member of 'aruco'

I get this error for a project with visual studio c++ (version 11.0), windows 7, 32 bit. I used the code from here http://docs.opencv.org/master/d5/dae/tutorial_aruco_detection.html#gsc.tab=0 (Marker creation) and included all mentioned files:

#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
#include "aruco.h"
#include "arucofidmarkers.h"
#include "highlyreliablemarkers.h"

using namespace cv;
using namespace std;

int main( int argc, char** argv )
{
    Mat markerImage;
    aruco::Dictionary dictionary = aruco::getPredefinedDictionary(aruco::DICT_4X4_50);
    aruco::drawMarker(dictionary, 23, 96, markerImage, 1);
    return 0;
}

I also made the proper adjustments to the workspace as described in http://docs.opencv.org/2.4/doc/tutorials/introduction/windows_visual_studio_Opencv/windows_visual_studio_Opencv.html#windows-visual-studio-how-to

I downloaded aruco version 1.3.0 and this function is not found in the files as is DICT_4X4_50, while aruco::Dictionary is present