saihv / coloc Goto Github PK
View Code? Open in Web Editor NEWVision based collaborative localization for micro aerial vehicles
License: MIT License
Vision based collaborative localization for micro aerial vehicles
License: MIT License
Hi, and thanks for making this code available! I am using it as reference to build a simpler application, stereo camera slam using KORAL and CUDA2KNN.
I am matching points, creating a local map, then matching each incoming frame to the local map.
If you have a minute, could you help me out with a couple of things?
I see that you add mapData with:
void setMapData(int kpNum, void* desc)
{
cudaMemsetAsync(d_descM, 0, 64 * (kpNum + 8), m_stream1);
cudaMemcpyAsync(d_descM, desc, 64 * (kpNum + 8), cudaMemcpyHostToDevice, m_stream1);
cudaStreamSynchronize(m_stream1);
this->kpMap = kpNum;
}
that makes sense. My issue is, if I have keypoints and descriptors from my current frame, and I want to add a subset of these to the local map, how do I do that with the descriptors?
Say that i have:
std::vector <cv::KeyPoint> kpsR;
std::vector<uint64_t> desc2;
And I only want to add the first 10 keypoints and descriptors to my local map.
I can just get the first 10 keypoints from the kpsL vector, but how do I do this with the descriptors, and add them to the map data as you do?
I am trying:
std::vector<cv::KeyPoint> localMap_kp;
std::vector<uint64_t> localMap_desc;
int ii = 0;
for (int i = 0; i < 10; i++)
{
for (int j = 0; j < 8; j++)
{
localMap_desc.push_back(desc2[ii + j]);
}
ii += 8;
localMap_kp.push_back(kpsR[i]);
}
matcher.setMapData(localMap_kp.size(), localMap_desc);
//match to this map
detector.extractFeatures(img1);
kpsL = detector.converted_kps;
matcher.matchSceneWithMap(detector.kps, detector.desc);
But this is clearly wrong. What is the right way to do this?
Thank you very much for your time!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.