Skip to content
Snippets Groups Projects

Resolve "Publisher for visual odometry"

Merged Joan Vallvé Navarro requested to merge 1-publisher-for-visual-odometry into devel

Closes #1 (closed)

Edited by Joan Solà Ortega

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
72 Function that change an image to show tracks and features within it
73 */
74 void showTracks(cv::Mat _image, const TrackMatrix& _track_matrix, CaptureBasePtr _cap_img, COLORFEATURES _color_of_features, bool _show_track_ID);
75
76 Eigen::Matrix<double, 2, 1> getPixelLandmark(LandmarkBasePtr _lmk, CaptureBasePtr _capture);
77 Eigen::Matrix<double, 3, 4> getProjectionMatrix(CaptureBasePtr _capture);
78 Eigen::Matrix<double, 4, 4> getT_c_w(CaptureBasePtr _capture);
79
80
81 protected:
82 ProcessorVisualOdometryPtr processor_vision_;
83 CaptureBasePtr last_capture_;
84
85 public:
86 image_transport::Publisher publisher_image_;
87 image_transport::ImageTransport it_;
  • 91 // Get capture image
    92 auto cap_img = std::dynamic_pointer_cast<CaptureImage>(processor_vision_->getLast());
    93
    94 assert(cap_img != nullptr && "Received Capture is not of type CaptureImage!");
    95
    96 auto track_matrix = processor_vision_->getTrackMatrix(); // copy track matrix
    97
    98 // Draw and publish debug image
    99 try
    100 {
    101 // Extract cv image
    102 cv::Mat cv_img_debug;
    103 cv::cvtColor(cap_img->getImage(), cv_img_debug, cv::COLOR_GRAY2BGR);
    104
    105 // Draw all tracks
    106 bool show_track_ids = false;
  • 226 default:
    227 break;
    228 }
    229
    230 return color;
    231 }
    232
    233 void PublisherVisionDebug::showTracks(cv::Mat _image,
    234 const TrackMatrix &_track_matrix,
    235 CaptureBasePtr _cap_img,
    236 COLORFEATURES _color_of_features,
    237 bool _show_track_ID)
    238 {
    239
    240 int size_feature_kf_pix_ = 1;
    241 int size_feature_current_pix_ = 2;
  • 260 std::cout << "SIZE 0 TRACK!!" << '\n';
    261 continue;
    262 }
    263
    264 // determine color and luminosity of track
    265 std::vector<int> color = colorTrackAndFeatures(track.size(),
    266 100, 450,
    267 max_feature_in_track,
    268 min_feature_in_track,
    269 _color_of_features);
    270
    271 // iterator to current feature in track
    272 Track::iterator ftr_current (track.find(time_capture));
    273
    274 // draw current feature
    275 int thickness_curr = 0.1; // -1 -> filled empty
  • added 1 commit

    Compare with previous version

  • added 1 commit

    • 46f7bf3c - Fix constness, add method, order class declaration

    Compare with previous version

  • added 1 commit

    • f7581f47 - Rename getPixelLandmark() --> projectLandmarkHp()

    Compare with previous version

  • added 2 commits

    • 9f1eae73 - Revert to original color code for CYAN
    • 685c63df - Refactor a bit for clarity and organization

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading