Functions
image_utilities.cpp File Reference
#include "ensenso_camera/ros2/cv_bridge/cv_bridge.h"
#include "ensenso_camera/image_utilities.h"
#include "ensenso_camera/conversion.h"
#include "ensenso_camera/ros2/core.h"
#include "ensenso_camera/ros2/logging.h"
#include "ensenso_camera/ros2/sensor_msgs/camera_info.h"
#include "ensenso_camera/ros2/sensor_msgs/distortion_models.h"
#include "ensenso_camera/ros2/sensor_msgs/image_encodings.h"
#include <string>
#include <utility>
#include <vector>
Include dependency graph for image_utilities.cpp:

Go to the source code of this file.

Functions

ImagePtr depthImageFromNxLibNode (NxLibItem const &node, std::string const &frame, bool isFileCamera)
 
void fillDistortionParamsFromNxLib (NxLibItem const &distortionItem, sensor_msgs::msg::CameraInfoPtr const &info)
 
std::string imageEncoding (bool isFloat, int channels, int bytesPerElement)
 
ImagePtr imageFromNxLibNode (NxLibItem const &node, std::string const &frame, bool isFileCamera)
 
ImagePtrPair imagePairFromNxLibNode (NxLibItem const &node, std::string const &frame, bool isFileCamera)
 
std::vector< ImagePtrPairimagePairsFromNxLibNode (NxLibItem const &node, std::string const &frame, bool isFileCamera)
 
std::vector< ImagePtrimagesFromNxLibNode (NxLibItem const &node, std::string const &frame, bool isFileCamera)
 
ensenso::ros::Time timestampFromNxLibNode (NxLibItem const &node)
 

Function Documentation

◆ depthImageFromNxLibNode()

ImagePtr depthImageFromNxLibNode ( NxLibItem const &  node,
std::string const &  frame,
bool  isFileCamera 
)

Get the z-channel from the calculated point cloud and transform it into a sensor_msgs/Image depth image defined in REP 118 - depth images. The Image has a canonical format (z-values in Meters, float 1-channel image (TYPE_32FC1)).

Definition at line 182 of file image_utilities.cpp.

◆ fillDistortionParamsFromNxLib()

void fillDistortionParamsFromNxLib ( NxLibItem const &  distortionItem,
sensor_msgs::msg::CameraInfoPtr const &  info 
)

Gets the corresponding distortion parameters from the Item.

Definition at line 206 of file image_utilities.cpp.

◆ imageEncoding()

std::string imageEncoding ( bool  isFloat,
int  channels,
int  bytesPerElement 
)

Definition at line 18 of file image_utilities.cpp.

◆ imageFromNxLibNode()

ImagePtr imageFromNxLibNode ( NxLibItem const &  node,
std::string const &  frame,
bool  isFileCamera 
)

Convert the given binary NxLib node to a ROS image message.

Definition at line 93 of file image_utilities.cpp.

◆ imagePairFromNxLibNode()

ImagePtrPair imagePairFromNxLibNode ( NxLibItem const &  node,
std::string const &  frame,
bool  isFileCamera 
)

Definition at line 116 of file image_utilities.cpp.

◆ imagePairsFromNxLibNode()

std::vector<ImagePtrPair> imagePairsFromNxLibNode ( NxLibItem const &  node,
std::string const &  frame,
bool  isFileCamera 
)

Convert the given NxLib node to a set of image pairs.

This function supports different types of image nodes. When the node is an array, it will create an image pair for each entry of the array (this is the case when FlexView is enabled). Otherwise it creates an image pair from the left and right child nodes (as it is the case when FlexView is disabled or not supported by a camera).

Definition at line 136 of file image_utilities.cpp.

◆ imagesFromNxLibNode()

std::vector<ImagePtr> imagesFromNxLibNode ( NxLibItem const &  node,
std::string const &  frame,
bool  isFileCamera 
)

Convert the given NxLib node to a set of images.

This function supports different types of image nodes. When the node is an array, it will create an image for each entry of the array. Otherwise it creates an image from the child node.

Definition at line 155 of file image_utilities.cpp.

◆ timestampFromNxLibNode()

ensenso::ros::Time timestampFromNxLibNode ( NxLibItem const &  node)

Get the timestamp from an NxLib image node.

Definition at line 174 of file image_utilities.cpp.



ensenso_camera
Author(s): Ensenso
autogenerated on Wed Apr 2 2025 02:37:46