pislam icon indicating copy to clipboard operation
pislam copied to clipboard

Convert pislam Descriptors to ORB Slam2 Descriptors?

Open Fredrum opened this issue 4 years ago • 1 comments

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 avatar Jul 17 '20 01:07 Fredrum

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);
    }

Fredrum avatar Jul 17 '20 06:07 Fredrum