Code Monkey home page Code Monkey logo

coloc's People

Contributors

codacy-badger avatar saihv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

tubbz-alt fsy759

coloc's Issues

Questions

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.