-
Notifications
You must be signed in to change notification settings - Fork 0
Update this repo with the latest STag fork #7
Comments
Functionally, the parts of the stag code that is being used is: bool STagDetector::configure() {
stag_ = std::make_shared<stag::Stag>(library_->get_value(), error_correction_->get_value(), false);
return BaseMarkerDetector::configure();
}
std::map<int, std::vector<cv::Point2d>> STagDetector::detect_markers(const cv::Mat& image) {
cv::Mat gray;
cv::cvtColor(image, gray, cv::COLOR_RGB2GRAY);
this->stag_->detectMarkers(gray);
annotated_image_ = this->stag_->drawMarkers();
std::map<int, std::vector<cv::Point2d>> markers;
for (const auto& marker: this->stag_->getMarkerList()) {
markers.insert_or_assign(marker.id, marker.corners);
}
return markers;
} So I am looking at the part of the code that invokes the
And after, there's some clean up with seperating headers and cpp file, as well as making sure all the installation and compilation scripts are working. We could try to update our Stag library to the latest version, and it would be easier to update down the line too (maybe). Let me know what you think. Originally posted by @JasperTan97 in https://github.com/aica-technology/stag/issues/6#issuecomment-1916680198 |
The way I shall do this, after discussion with @eeberhard, is to fork the latest stag repo in a test repo, before merging it into this one. |
Thanks! When referring to the latest Stag fork, we are talking about https://github.com/manfredstoiber/stag |
After updating, here are some learning points. The major changes to the stag library involves shifting from a
To be precise, there is still a ( Perhaps there were missing |
Alright this is now an EPIC, to keep track of everything properly |
To consider as a followup: |
Currently, there are too many problems with memory leaks due to the use of raw pointers instead of smart ones. Fortunately the original Stag code has been updated to (hopefully) solve this problem. However, we will need to ensure that issues 1 to 4 are either replicated or somehow brought forward such that the fork is compatible with the pose detection code.
Tasks
The text was updated successfully, but these errors were encountered: