Skip to content

Commit

Permalink
moving from non-normalized to normalized facial landmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzoferrini committed Aug 7, 2023
1 parent 6e2094f commit da528bd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/hri_humans.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,10 @@ void HumansDisplay::processMessage(const sensor_msgs::Image::ConstPtr& msg) {
auto landmarks = *(face_ptr->facialLandmarks()); // boost::optional
for(auto landmark : landmarks){
if(landmark.x > 0 || landmark.y > 0)
cv::circle(cvBridge_->image, cv::Point(landmark.x, landmark.y), 5, get_color_from_id(face.first), cv::FILLED);
cv::circle(cvBridge_->image,
cv::Point(static_cast<int>(landmark.x*msg->width), static_cast<int>(landmark.y*msg->height)),
5,
get_color_from_id(face.first), cv::FILLED);
}
}
}
Expand Down

0 comments on commit da528bd

Please sign in to comment.