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 8810625
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:09:51+00:00 2026-06-14T03:09:51+00:00

I want to perform a very simple task, but cannot due to an error

  • 0

I want to perform a very simple task, but cannot due to an error I cannot figure out. I want to save the contents of the features detected to a vector onto a txt file using the following piece of code

Ptr<FeatureDetector> feature_detector = FeatureDetector::create("SIFT");
vector<KeyPoint> keypoints;

feature_detector->detect(img, keypoints);

for(unsigned int i = 0; i < keypoints.size(); i++)
{
    ofstream outf("vector.txt", ios::app);
    outf<<"value at "<< i << " = " << keypoints.at<KeyPoint>(i)<<endl;
}

But I am presented with the following error:

std::vector<_Ty>::at’: function call missing argument list; use
‘&std::vector<_Ty>::at’ to create a pointer to member

I checked my syntax and cannot find anything wrong.

Edit: Before this I wanted to print out the contents of a matrix and this format worked perfectly for it, here is the code I used to print the contents of the matrix:

for(int x = 0;x < dst.rows ; x++)
{
    for( int y = 0; y < dst.cols; y++)
    {
        ofstream outf("Sample.txt", ios::app);
        outf<<"value at "<< x << "  " << y << " = " << dst.at<float>(x,y)<<endl;
    }
}

Where dst is a matrix consisting of float data type

  • 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-14T03:09:53+00:00Added an answer on June 14, 2026 at 3:09 am

    Using the builtin FileStorage class this was as easy as adding two lines.. I printed the vector of KeyPoints using the following lines:

    FileStorage fs("test.xml", FileStorage::WRITE);
    
        fs << "meh" << keypoints;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to do a very simple alpha animation but I cannot find a
Trying to perform a very simple task here. I have an <ol> that contains
Ok, a really simple question but I am too thick to figure it out.
I want perform a easy task in android, which when receiving a call the
I want to perform simple validation against multiple fields. Please note these fields are
I want to build a very simple servlet that will read the http posted
I need to perform a very simple operation on the database - put some
What I want to do is very simple, yet can't find the way to
I want to do a very simple thing with AJAX. Apologize if it sounds
I have a simple task to accomplish, but I am not sure what is

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.