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

[Issue #626] - Frame publisher function to get landmarks and keypoints with lock held #628

Merged
merged 2 commits into from
Jan 6, 2025

Conversation

Skwangles
Copy link
Contributor

Landmarks are made from the size of undistorted keypoints, so they are exactly the same size.
If frame_publisher::update() is called in between get_keypoints() and get_landmarks() this assertion may not hold.

Add function which returns both in a pair without releasing the mutex lock

@@ -194,6 +200,7 @@ void frame_publisher::update(const std::vector<std::shared_ptr<data::landmark>>&

img.copyTo(img_);

assert(keypts.size() == curr_lms.size());
Copy link
Contributor Author

@Skwangles Skwangles Jan 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't seen anywhere in the frame_publisher that asserts this assumption, and it is not clear to me as a reader the relationship between keypts and curr_lms, so I thought i'd add one.

With the issue with iridescence viewer having these two mismatched, it just feels right to assert the assumption here to make clear their relationship and track any issues further up the chain.

@ymd-stella ymd-stella self-requested a review January 6, 2025 11:42
@ymd-stella ymd-stella merged commit 1d6a595 into stella-cv:main Jan 6, 2025
5 checks passed
@Skwangles Skwangles deleted the keypoint-landmarks branch January 6, 2025 21:52
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

Successfully merging this pull request may close these issues.

2 participants