add gallery visualization, confirm no bug in gallery
可视化非常优秀非常直观
This commit is contained in:
@@ -100,6 +100,7 @@ private:
|
||||
std::string sync_image_compressed_topic_;
|
||||
std::string sync_overlay_image_topic_;
|
||||
std::string sync_detection_debug_image_topic_;
|
||||
std::string sync_gallery_debug_topic_;
|
||||
std::string sync_target_observation_topic_;
|
||||
std::string sync_track_observations_topic_;
|
||||
std::string sync_detection_pos_cam_topic_;
|
||||
@@ -114,6 +115,7 @@ private:
|
||||
|
||||
rclcpp::Publisher<CompressedImage>::SharedPtr overlay_compressed_pub_; // optional if send_overlay_
|
||||
rclcpp::Publisher<CompressedImage>::SharedPtr detection_debug_compressed_pub_; // debug detections/tracks
|
||||
rclcpp::Publisher<Image>::SharedPtr gallery_debug_pub_;
|
||||
rclcpp::Publisher<CompressedImage>::SharedPtr combined_pub_; // optional if publish_combined_compressed_
|
||||
rclcpp::Publisher<odin_ros_driver::msg::TargetObservation>::SharedPtr target_observation_pub_;
|
||||
rclcpp::Publisher<odin_ros_driver::msg::TargetObservationArray>::SharedPtr track_observations_pub_;
|
||||
|
||||
@@ -25,16 +25,21 @@ public:
|
||||
explicit TrackGallery(size_t max_features = 10);
|
||||
|
||||
void clear();
|
||||
void add(const ReIDFeature& feature, int64_t frame_index);
|
||||
void add(
|
||||
const ReIDFeature& feature,
|
||||
int64_t frame_index,
|
||||
const cv::Mat& crop_bgr = cv::Mat());
|
||||
|
||||
bool empty() const { return features_.empty(); }
|
||||
size_t size() const { return features_.size(); }
|
||||
int64_t last_update_frame() const { return last_update_frame_; }
|
||||
const std::deque<cv::Mat>& crops_bgr() const { return crops_bgr_; }
|
||||
|
||||
float best_similarity(const ReIDFeature& query) const;
|
||||
|
||||
private:
|
||||
std::deque<ReIDFeature> features_;
|
||||
std::deque<cv::Mat> crops_bgr_;
|
||||
size_t max_features_ = 10;
|
||||
int64_t last_update_frame_ = -1;
|
||||
};
|
||||
|
||||
@@ -164,6 +164,10 @@ public:
|
||||
int current_target_stable_id() const { return current_target_stable_id_; }
|
||||
int current_frame_primary_stable_id() const { return last_selected_primary_stable_id_; }
|
||||
cv::Rect last_detection_roi() const { return last_detection_roi_; }
|
||||
cv::Mat render_gallery_debug_image(
|
||||
int max_tracks = 8,
|
||||
int gallery_cols = 10,
|
||||
cv::Size cell_size = cv::Size(96, 192)) const;
|
||||
|
||||
bool initialized() const { return initialized_; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user