Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7756347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:47:55+00:00 2026-06-01T12:47:55+00:00

I am trying to get the Aruco AR library working by trying out the

  • 0

I am trying to get the Aruco AR library working by trying out the simple test in my code.

For some reason I cannot get the call to detect() to work. My code is as follows:

  cv::Mat image(480,640,CV_8UC3, mimFrameRGB.data()); 
  MarkerDetector mDetector;
  std::vector<Marker> markers;
  CameraParameters cParams();
  float markerSize = 0.1f;
  mDetector.detect(image,markers,cParams,markerSize);

The compiler complains that there is no overloaded function that matches my input parameters. Specifically that parameter 3 should be of type cv::Mat.

Looking at the header file for the MarkerDetector, the following two method calls are found:

 void detect(const cv::Mat &input,std::vector<Marker> &detectedMarkers,cv::Mat camMatrix=cv::Mat(),cv::Mat distCoeff=cv::Mat(),float markerSizeMeters=-1) throw (cv::Exception);
 void detect(const cv::Mat &input,std::vector<Marker> &detectedMarkers, CameraParameters camParams,float markerSizeMeters=-1) throw (cv::Exception);

I am trying to call the second one, however it chooses the first one and gives me a compile error. What is going wrong? are my input parameters not matching either case?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T12:47:57+00:00Added an answer on June 1, 2026 at 12:47 pm

    I think the issue is this line:

    CameraParameters cParams();
    

    This does not declare a variable of type CameraParameters, but instead is a function prototype for a function called cParams that takes no parameters and returns a CameraParameters. This is an extremely annoying part of the C++ language, since the code is legal but doesn’t do what you want.

    Because cParams is actually a function prototype and not a variable declaration, the C++ overload resolution mechanism is getting confused about the types of the arguments and is failing to correctly select the oveload you’d like. Removing the parentheses on this line and having it just read

    CameraParameters cParams;
    

    should fix this problem.

    Hope this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying get some licensing code from AndroidPit.com working, but I get Unable to
Trying to get a value from a object isn't working out. class Asset <
I am trying get Struts 2 and Tiles to work and I am using
Trying to get this expression to work, can someone look at it and tell
Trying to get a random string out of ListArray on the button pressed. Always
When I'm trying get method from remote webservice it gives me error. My code
Hello everyone I been trying get php uploader working but having a lot of
Trying to get a login script working, I kept getting the same login page
Trying to get a form for adding, editing and removing embedded documents working as
I'm trying get LocalConnection to work between two swf's placed within two different IFRAMES.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.