pislam
pislam copied to clipboard
Convert pislam Descriptors to ORB Slam2 Descriptors?
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
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);
}