Skip to content

Commit

Permalink
updated formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
rsoussan committed Apr 17, 2024
1 parent 451a003 commit 3bed9ae
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tools/localization_analysis/src/feature_track_image_adder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ void FeatureTrackImage(const vc::SpacedFeatureTracker& feature_tracker,
const auto& feature_track = feature_track_pair.second;
// Color using unique color for id
const int id = feature_track.set().crbegin()->second.feature_track_id;
const cv::Scalar color = cv::Scalar((id*123) % 255, (id * 456) % 255, (id * 789) % 255);
const cv::Scalar color = cv::Scalar((id*123) % 255, (id * 456) % 255, (id * 789) % 255);

// Draw track history
if (feature_track.size() > 1) {
Expand Down Expand Up @@ -71,19 +71,19 @@ void MarkSmartFactorPoints(const std::vector<boost::shared_ptr<const factor_adde
cv::circle(feature_track_image, distorted_point, 6 /* Radius*/, cv::Scalar(100, 100, 100), -1 /*Filled*/, 8);
}
// Draw reprojected triangulated point in blue, draw red line to latest measurement showing projection error
const auto triangulated_point = smart_factor->serialized_point(values);
const auto cameras = smart_factor->cameras(values);
const auto triangulated_point = smart_factor->serialized_point(values);
const auto cameras = smart_factor->cameras(values);

// Cameras are in same order as keys
const auto& measurements = smart_factor->measured();
// Cameras are in same order as keys
const auto& measurements = smart_factor->measured();
if (triangulated_point) {
// Latest camera is first camera
const auto projected_point = cameras.front().project2(*triangulated_point);
const auto distorted_projected_point = localization_analysis::Distort(projected_point, camera_params);
cv::circle(feature_track_image, distorted_projected_point, 7 /* Radius*/, cv::Scalar(255, 0, 0), -1 /*Filled*/,
8);
cv::line(feature_track_image, distorted_projected_point, distorted_point, cv::Scalar(0, 0, 255), 2, 8, 0);
}
}
}
}

Expand Down

0 comments on commit 3bed9ae

Please sign in to comment.