Functions
conversion.cpp File Reference
#include <cstring>
#include <stdexcept>
#include <boost/format.hpp>
#include <tf/transform_datatypes.h>
#include <sensor_msgs/Image.h>
#include <sensor_msgs/image_encodings.h>
#include <sensor_msgs/distortion_models.h>
#include <visp3/core/vpImage.h>
#include <visp3/core/vpTranslationVector.h>
#include <visp3/core/vpQuaternionVector.h>
#include <visp3/mbt/vpMbGenericTracker.h>
#include "conversion.hh"
Include dependency graph for conversion.cpp:

Go to the source code of this file.

Functions

void convertInitRequestToVpKltOpencv (const visp_tracker::Init::Request &req, vpMbGenericTracker &tracker, vpKltOpencv &klt)
 
void convertInitRequestToVpMbTracker (const visp_tracker::Init::Request &req, vpMbGenericTracker &tracker)
 
void convertInitRequestToVpMe (const visp_tracker::Init::Request &req, vpMbGenericTracker &tracker, vpMe &moving_edge)
 
void convertVpKltOpencvToInitRequest (const vpKltOpencv &klt, const vpMbGenericTracker &tracker, visp_tracker::Init &srv)
 
std::string convertVpKltOpencvToRosMessage (const vpMbGenericTracker &tracker, const vpKltOpencv &klt)
 
void convertVpMbTrackerToInitRequest (const vpMbGenericTracker &tracker, visp_tracker::Init &srv)
 
std::string convertVpMbTrackerToRosMessage (const vpMbGenericTracker &tracker)
 
void convertVpMeToInitRequest (const vpMe &moving_edge, const vpMbGenericTracker &tracker, visp_tracker::Init &srv)
 
std::string convertVpMeToRosMessage (const vpMbGenericTracker &tracker, const vpMe &moving_edge)
 
void initializeVpCameraFromCameraInfo (vpCameraParameters &cam, sensor_msgs::CameraInfoConstPtr info)
 
void rosImageToVisp (vpImage< unsigned char > &dst, const sensor_msgs::Image::ConstPtr &src)
 Convert a ROS image into a ViSP one. More...
 
void transformToVpHomogeneousMatrix (vpHomogeneousMatrix &dst, const geometry_msgs::Transform &src)
 
void transformToVpHomogeneousMatrix (vpHomogeneousMatrix &dst, const geometry_msgs::Pose &src)
 
void vispImageToRos (sensor_msgs::Image &dst, const vpImage< unsigned char > &src)
 Convert a ViSP image into a ROS one. More...
 
void vpHomogeneousMatrixToTransform (geometry_msgs::Transform &dst, const vpHomogeneousMatrix &src)
 

Function Documentation

void convertInitRequestToVpKltOpencv ( const visp_tracker::Init::Request &  req,
vpMbGenericTracker &  tracker,
vpKltOpencv &  klt 
)

Definition at line 240 of file conversion.cpp.

void convertInitRequestToVpMbTracker ( const visp_tracker::Init::Request &  req,
vpMbGenericTracker &  tracker 
)

Definition at line 186 of file conversion.cpp.

void convertInitRequestToVpMe ( const visp_tracker::Init::Request &  req,
vpMbGenericTracker &  tracker,
vpMe &  moving_edge 
)

Definition at line 207 of file conversion.cpp.

void convertVpKltOpencvToInitRequest ( const vpKltOpencv &  klt,
const vpMbGenericTracker &  tracker,
visp_tracker::Init &  srv 
)

Definition at line 226 of file conversion.cpp.

std::string convertVpKltOpencvToRosMessage ( const vpMbGenericTracker &  tracker,
const vpKltOpencv &  klt 
)

Definition at line 106 of file conversion.cpp.

void convertVpMbTrackerToInitRequest ( const vpMbGenericTracker &  tracker,
visp_tracker::Init &  srv 
)

Definition at line 179 of file conversion.cpp.

std::string convertVpMbTrackerToRosMessage ( const vpMbGenericTracker &  tracker)

Definition at line 81 of file conversion.cpp.

void convertVpMeToInitRequest ( const vpMe &  moving_edge,
const vpMbGenericTracker &  tracker,
visp_tracker::Init &  srv 
)

Definition at line 193 of file conversion.cpp.

std::string convertVpMeToRosMessage ( const vpMbGenericTracker &  tracker,
const vpMe &  moving_edge 
)

Definition at line 90 of file conversion.cpp.

void initializeVpCameraFromCameraInfo ( vpCameraParameters &  cam,
sensor_msgs::CameraInfoConstPtr  info 
)

Definition at line 256 of file conversion.cpp.

void rosImageToVisp ( vpImage< unsigned char > &  dst,
const sensor_msgs::Image::ConstPtr &  src 
)

Convert a ROS image into a ViSP one.

This function copy a ROS image into a ViSP image. If the size are not matching, the ViSP image will be resized.

Warning
Some encodings only are supported.
Parameters
dstViSP destination image
srcROS source image

Definition at line 21 of file conversion.cpp.

void transformToVpHomogeneousMatrix ( vpHomogeneousMatrix &  dst,
const geometry_msgs::Transform &  src 
)

Definition at line 138 of file conversion.cpp.

void transformToVpHomogeneousMatrix ( vpHomogeneousMatrix &  dst,
const geometry_msgs::Pose src 
)

Definition at line 146 of file conversion.cpp.

void vispImageToRos ( sensor_msgs::Image &  dst,
const vpImage< unsigned char > &  src 
)

Convert a ViSP image into a ROS one.

This function copy a ViSP image into a ROS image. The whole content of the ROS image will be reset except the following field which will not be set:

  • header
  • is_bigendian
Parameters
dstROS destination image
srcViSP source image

Definition at line 67 of file conversion.cpp.

void vpHomogeneousMatrixToTransform ( geometry_msgs::Transform &  dst,
const vpHomogeneousMatrix &  src 
)

Definition at line 122 of file conversion.cpp.



visp_tracker
Author(s): Thomas Moulard
autogenerated on Sat Mar 13 2021 03:20:06