Capturing Images from IP Camera and Publish it in ROS Image Message

Source https://github.com/ardyadipta/ROS/tree/master/camera_image

The upside and challenges of this work were so many ROS packages available for reading images from cameras. However, most of them were meant for PR2 robot or specific brand IP Cameras such as AXIS. Those packages were complicated with a lot of configurations and format, which were specified for that camera. Doing reverse-engineering on those packages was a hassle since a lot of configurations need to be understood. So, I decided to keep learning from OpenCV module and tried to build my own package from scratch.

At the end, I learned how to get images from IP camera. I used a stream module from OpenCV library to read every byte of the image, then stored it to OpenCV matrix CvMat and converted it to ROS Message using cv_bridge, a ROS Module which is able to convert OpenCV images to ROS Messages and vice versa. The chart of this work can be seen in figure 1.

To demonstrate it, I opened  3 windows as seen in figure 2: Publisher Node, Subscriber Node and rqt_graph window. Publisher node captured the images from the IP camera, converted the images using cv_bridge, and then sent the ROS Image message named “/camera_image”. Subscriber node received the messages from publisher node, reconverted it back to OpenCV Image and then showed the OpenCV Image. The last window is rqt_graph, which was showed the relation between those nodes and the name of the message that was sent by the publisher to the subscriber node.

CV Bridge
Figure 1. CV Bridge Communication

They are therefore able to suggest you and tell you the desired treatment for it and do not just suffer the problem. canadian pharmacy viagra The condition holds many causes and erectile dysfunction is not too taboo to leave untreated! It is a condition that is often treatable with oral medications. free levitra http://appalachianmagazine.com/2016/10/27/attorney-general-morrisey-transfers-another-1m-to-reduce-state-police-drug-test-backlog/ This makes it one of the most valuable foods that we can to fight cancer, Alzheimer’s disease, aging and conditions associated with free radical damage and order cheap levitra http://appalachianmagazine.com/category/featured/page/51/?filter_by=popular oxidative stress. The features and properties of Generic Tadalafil have http://appalachianmagazine.com/2014/06/16/the-story-of-virginias-barter-theatre/ levitra price been all praise for it and many swear by its use.
IP Camera connected and published in ROS Image Message
Figure 2. IP Camera connected and published in ROS Image Message

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *