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

What does this k mean? #1

Open
MathsionYang opened this issue Oct 27, 2019 · 0 comments
Open

What does this k mean? #1

MathsionYang opened this issue Oct 27, 2019 · 0 comments

Comments

@MathsionYang
Copy link

// Every grid offset
for(int k = 0; k < 4; k++)
{
computeOffset(k, off_x, off_y);
for(int i = 0; i < m.size(); i++)
{
// Keypoint indices
kIdx_1 = m[i].queryIdx;
kIdx_2 = m[i].trainIdx;

			// Source and destination cells
			gIdx_1 = getGridIdxFromPoint(kp_1[kIdx_1].pt, off_x, off_y, _im1->cols / N, _im1->rows / N);
			gIdx_2 = getGridIdxFromPoint(kp_2[kIdx_2].pt, off_x, off_y, _im2->cols / N, _im2->rows / N);

			// Instantiate cellMatch object and add to grid
			cell_matches[k][gIdx_1].push_back({gIdx_1, gIdx_2, kp_1[kIdx_1], kp_2[kIdx_2], m[i]});

			// Increment match count
			cell_bins[k][gIdx_1][gIdx_2]++;
	}
}
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