how to get co-ordinate value in pixel

asked 2021-10-26 14:30:24 -0500

Anukriti gravatar image

Hi, using find_object_2d ROS package, the values printed are Q homography values, but what if I need the value of four corners of the bounding box in pixel? How can I get that?

edit retag flag offensive close merge delete

Comments

You could subscribe to raw image and with the coordinates then use opencv to get pixel info

osilva gravatar image osilva  ( 2021-10-26 14:44:09 -0500 )edit

@osilva, I am actually very new to ROS. I am subscribing to the camera place on top of my robot in rviz-gazebo. This is the program actually https://github.com/introlab/find-obje..., from where can I print the pizels?

Anukriti gravatar image Anukriti  ( 2021-10-27 11:42:42 -0500 )edit

cv_bridge::CvImage img; img = *imageDepthPtr;

osilva gravatar image osilva  ( 2021-10-27 15:18:22 -0500 )edit

So do a bit of research on how to use opencv but you already have the image. Just need to apply the operation to find pixels RGB components

osilva gravatar image osilva  ( 2021-10-27 15:19:54 -0500 )edit