ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Modify an image from another node

asked 2017-02-02 10:51:01 -0500

matt27110 gravatar image

Hello everyone,

Currently, I'm working on the AR drone 2.0 with ROS indigo. I want to track an object.

At the moment, I have 3 nodes: the first one gets a camera capture from the drone's camera and send it to the 2nd node (it works).

The second node takes the capture, binarizes it and send the binarized image to my 3rd node. (it works)

From this binarized image, my 3rd node finds the barycenter of my target and now, I want to draw a rectangle onto the image coming from the camera in the first node but I don't know how to proceed since my 3rd node.

Do you have any idea ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-02-03 02:27:34 -0500

I can think of two solutions:

The first is to have your 3rd node also subscribed on the camera capture and based on the binarized image coming from the 2nd node, draw on the first. This method requires synchronization to make sure that you are drawing on the correct frame, but it also depends on the accuracy you need to achieve.

The second method is to transmit the starting image through all nodes, which saves you the synchronization hassle, but adds way too much info on the network.

edit flag offensive delete link more


Thank you for your answer, the second method seems better for me !

matt27110 gravatar image matt27110  ( 2017-02-03 04:09:35 -0500 )edit

Good luck!

gstavrinos gravatar image gstavrinos  ( 2017-02-03 06:48:21 -0500 )edit

Question Tools

1 follower


Asked: 2017-02-02 10:51:01 -0500

Seen: 108 times

Last updated: Feb 02 '17