Function sensor_msgs::fillImage

Function Documentation

static inline bool sensor_msgs::fillImage(msg::Image &image, const std::string &encoding_arg, uint32_t rows_arg, uint32_t cols_arg, uint32_t step_arg, const void *data_arg)

Fill an image message.

Parameters:
  • image[out] Image to be filled.

  • encoding_arg[in] Encoding type, such as sensor_msgs::image_encodings::RGB8.

  • rows_arg[in] Number of rows.

  • cols_arg[in] Number of columns.

  • step_arg[in] Step size.

  • data_arg[in] Data to fill image with.

Returns:

True if successful.