Skip to content

Commit

Permalink
[FIX] re-add code snippet for publishing self-occluded nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
hollydinkel committed Jan 23, 2024
1 parent 0193536 commit f81157c
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions trackdlo/src/trackdlo_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,11 +322,14 @@ sensor_msgs::ImagePtr Callback(const sensor_msgs::ImageConstPtr& image_msg, cons
}

// add edges for checking overlap with upcoming nodes
double x1 = col_1;
double y1 = row_1;
double x2 = col_2;
double y2 = row_2;
cv::line(projected_edges, cv::Point(x1, y1), cv::Point(x2, y2), cv::Scalar(255, 255, 255), dlo_pixel_width);
cv::line(projected_edges, cv::Point(col_1, row_1), cv::Point(col_2, row_2), cv::Scalar(255, 255, 255), dlo_pixel_width);
}

// obtain self-occluded nodes
for (int i = 0; i < Y.rows(); i ++) {
if (std::find(not_self_occluded_nodes.begin(), not_self_occluded_nodes.end(), i) == not_self_occluded_nodes.end()) {
self_occluded_nodes.push_back(i);
}
}

// sort visible nodes to preserve the original connectivity
Expand Down

0 comments on commit f81157c

Please sign in to comment.