TDCamWorker
-
class TDCamWorker : public Worker, public TDCam
The threaded tag detector camera worker periodically polls its capture device for new camera frames, detects Apriltags in the frame, then passes the Apriltag pose detections to the LocalizationWorker class via a callback function. This worker also provides access to an annotated image with bounding boxes and tag IDs displayed around detected Apriltags in the latest camera frame.
Public Functions
-
TDCamWorker() = delete
No default constructor.
-
TDCamWorker(CamParams &c_params, const std::map<int, Pose_single> &tag_layout, std::function<bool(TagArray&)> queue_tags_callback, bool record_video)
Call the Worker and TDCam constructors, set execution frequency to 50hz and enable stay_alive. Register the tag detection callback function, and set flag to enable/disable debug cv ImShow.
- Parameters:
c_params – The camera configuration to use during setup and computations.
tag_layout – The Apriltag field layout to use during computations.
queue_tags_callback – Pass all Apriltag pose detections in the frame through this callback function.
record_video – Flag to enable/disable video recording.
-
cv::Mat GetAnnotatedIm()
Get the latest camera image with Apriltag detections highlighted with bounding boxes and tagg IDs.
- Returns:
The latest annotated image.
-
TDCamWorker() = delete