Gazebo | Ignition | Community
Ask Your Question

output of camera plugin in standalone gazebo

asked 2013-06-24 11:05:23 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hi all,

Dear Friends, i want to do a simple project and i need to image processing, i should say that i work with standalone version of gazebo (1.8) (without ROS), so, i inserted a camera in gazebo and i get output of it with this command:

> gztopic echo /gazebo/default/camera/link/camera/image

but i can't understand its output:

    time {
  sec: 17
  nsec: 449000000
image {
  width: 5
  height: 2
  pixel_format: 3
  step: 15
  data: "\255\273\336\250\267\333\246\264\332\246\265\332\251\267\333\214\214\214\214\214\214\214\214\214\214\214\214\214\214\214"

any one can explain the output? also i set width = 5 and height=2 in SDF file of camera. i want to know what is the pixel_format and step and order of data ?!

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2013-06-25 09:42:11 -0500

SL Remy gravatar image

The data is the raw value of the pixels. There are 30 (5*2 sets of RGB values) in the item. From a brief look at Image.hh, the format 3 is probably RGB_INT8.

The step is how long a row of data is in the image (5 pixels and 3 values for each pixel).

edit flag offensive delete link more


Thank you so much, but my friend i can't understand exactly order of data? based on your explanation the first three number are for first pixel in first line and first column (or in other way the first fifteen number are for first row of image), and data printed row by row? am i right?!

Vahid gravatar imageVahid ( 2013-06-25 10:41:02 -0500 )edit

That's how I interpret the data.

SL Remy gravatar imageSL Remy ( 2013-06-25 13:14:42 -0500 )edit

Thank you so much my friend.

Vahid gravatar imageVahid ( 2013-06-25 14:56:43 -0500 )edit
Login/Signup to Answer

Question Tools


Asked: 2013-06-24 11:05:23 -0500

Seen: 819 times

Last updated: Jun 25 '13