Skip to content

Error #13

@shashankvkt

Description

@shashankvkt

Hello I'm new to april tags and need a bit of help. Using your repository I've been able to compile as mentioned, but when i try to write a small snippet for another application (where i need to extract the center of the tag, I am facing a small issue and need `advise.The following is the code i've included all header files accordingly.

`using namespace std;
using namespace AprilTags;
using namespace cv;

int main(int argc, char* argv[])
{
VideoCapture cap(1); // open the default camera
if(!cap.isOpened()) // check if we succeeded
return -1;

namedWindow("view",1);
TagDetector detector(AprilTags::tagCodes36h11);

for(;;)
{
    Mat frame;
    cap >> frame; // get a new frame from camera
    std::vector< TagDetection> detector.extractTags(frame);
     imshow("view", frame);
    if(waitKey(30) >= 0) break;
}
// the camera will be deinitialized automatically in VideoCapture destructor
return 0;

}`

and am getting the following error which i am not able to solve.

In function main': /home/shashank/catkin_ws/src/apriltags-cpp/src/my_tag.cpp:39: undefined reference to AprilTags::TagDetector::extractTags(cv::Mat const&)'
CMakeFiles/my_tag.dir/my_tag.cpp.o: In function AprilTags::TagDetector::TagDetector(AprilTags::TagCodes const&)': /usr/local/include/AprilTags/TagDetector.h:21: undefined reference to AprilTags::TagFamily::TagFamily(AprilTags::TagCodes const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [my_tag] Error 1
make[1]: *** [src/CMakeFiles/my_tag.dir/all] Error 2
make: *** [all] Error 2

could you plz help me on this.
Thnk you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions