Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert pislam Descriptors to ORB Slam2 Descriptors? #10

Open
Fredrum opened this issue Jul 17, 2020 · 1 comment
Open

Convert pislam Descriptors to ORB Slam2 Descriptors? #10

Fredrum opened this issue Jul 17, 2020 · 1 comment

Comments

@Fredrum
Copy link

Fredrum commented Jul 17, 2020

Hi again!

I am trying to take the pislam descriptors and convert them into the cv::Mat based descriptors that are used in the ORB SLAM code.
So basically this,
std::vector<uint32_t> descriptors;

needs to map onto this:

_descriptors.create(keypoints.size(), 32, CV_8U); // _descriptors is OutputArray/Mat

I'm having a hard time understanding how that should work.
Do you have any advice?

EDIT: Will this need to involve bit shifting somehow?

Cheers
Fred

@Fredrum
Copy link
Author

Fredrum commented Jul 17, 2020

I got something that builds and runs but something is not correct as I get wild green markers, or no markers, in the ORB test.

This is what I have now,

    _descriptors.create(keypoints.size(), 32, CV_8U);  // The cv::OutputArray
    Mat DMat = _descriptors.getMat(); // Then fill DMat for output
    for(int i=0; i < descriptors.size(); i++)
    {
        cv::Mat row = cv::Mat(1, 32, CV_8U, descriptors[i]); // taking the Pislam descriptor
        DMat.push_back(row);
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant