mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-11 12:09:51 +08:00
stereo_odometry: added bgra8 and rgba8 support
This commit is contained in:
@@ -245,7 +245,7 @@ private:
|
|||||||
depth->encoding.compare(sensor_msgs::image_encodings::TYPE_32FC1)==0 ||
|
depth->encoding.compare(sensor_msgs::image_encodings::TYPE_32FC1)==0 ||
|
||||||
depth->encoding.compare(sensor_msgs::image_encodings::MONO16)==0))
|
depth->encoding.compare(sensor_msgs::image_encodings::MONO16)==0))
|
||||||
{
|
{
|
||||||
NODELET_ERROR("Input type must be image=mono8,mono16,rgb8,bgr8 (mono8 "
|
NODELET_ERROR("Input type must be image=mono8,mono16,rgb8,bgr8,rgba8,bgra8 (mono8 "
|
||||||
"recommended) and image_depth=16UC1,32FC1,mono16. Types detected: %s %s",
|
"recommended) and image_depth=16UC1,32FC1,mono16. Types detected: %s %s",
|
||||||
image->encoding.c_str(), depth->encoding.c_str());
|
image->encoding.c_str(), depth->encoding.c_str());
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -177,13 +177,17 @@ private:
|
|||||||
if(!(imageRectLeft->encoding.compare(sensor_msgs::image_encodings::MONO8) ==0 ||
|
if(!(imageRectLeft->encoding.compare(sensor_msgs::image_encodings::MONO8) ==0 ||
|
||||||
imageRectLeft->encoding.compare(sensor_msgs::image_encodings::MONO16) ==0 ||
|
imageRectLeft->encoding.compare(sensor_msgs::image_encodings::MONO16) ==0 ||
|
||||||
imageRectLeft->encoding.compare(sensor_msgs::image_encodings::BGR8) == 0 ||
|
imageRectLeft->encoding.compare(sensor_msgs::image_encodings::BGR8) == 0 ||
|
||||||
imageRectLeft->encoding.compare(sensor_msgs::image_encodings::RGB8) == 0) ||
|
imageRectLeft->encoding.compare(sensor_msgs::image_encodings::RGB8) == 0 ||
|
||||||
|
imageRectLeft->encoding.compare(sensor_msgs::image_encodings::BGRA8) == 0 ||
|
||||||
|
imageRectLeft->encoding.compare(sensor_msgs::image_encodings::RGBA8) == 0) ||
|
||||||
!(imageRectRight->encoding.compare(sensor_msgs::image_encodings::MONO8) ==0 ||
|
!(imageRectRight->encoding.compare(sensor_msgs::image_encodings::MONO8) ==0 ||
|
||||||
imageRectRight->encoding.compare(sensor_msgs::image_encodings::MONO16) ==0 ||
|
imageRectRight->encoding.compare(sensor_msgs::image_encodings::MONO16) ==0 ||
|
||||||
imageRectRight->encoding.compare(sensor_msgs::image_encodings::BGR8) == 0 ||
|
imageRectRight->encoding.compare(sensor_msgs::image_encodings::BGR8) == 0 ||
|
||||||
imageRectRight->encoding.compare(sensor_msgs::image_encodings::RGB8) == 0))
|
imageRectRight->encoding.compare(sensor_msgs::image_encodings::RGB8) == 0 ||
|
||||||
|
imageRectRight->encoding.compare(sensor_msgs::image_encodings::BGRA8) == 0 ||
|
||||||
|
imageRectRight->encoding.compare(sensor_msgs::image_encodings::RGBA8) == 0))
|
||||||
{
|
{
|
||||||
NODELET_ERROR("Input type must be image=mono8,mono16,rgb8,bgr8 (mono8 recommended), received types are %s (left) and %s (right)",
|
NODELET_ERROR("Input type must be image=mono8,mono16,rgb8,bgr8,rgba8,bgra8 (mono8 recommended), received types are %s (left) and %s (right)",
|
||||||
imageRectLeft->encoding.c_str(), imageRectRight->encoding.c_str());
|
imageRectLeft->encoding.c_str(), imageRectRight->encoding.c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -254,13 +258,17 @@ private:
|
|||||||
if(!(imageRectLeft->encoding.compare(sensor_msgs::image_encodings::MONO8) ==0 ||
|
if(!(imageRectLeft->encoding.compare(sensor_msgs::image_encodings::MONO8) ==0 ||
|
||||||
imageRectLeft->encoding.compare(sensor_msgs::image_encodings::MONO16) ==0 ||
|
imageRectLeft->encoding.compare(sensor_msgs::image_encodings::MONO16) ==0 ||
|
||||||
imageRectLeft->encoding.compare(sensor_msgs::image_encodings::BGR8) == 0 ||
|
imageRectLeft->encoding.compare(sensor_msgs::image_encodings::BGR8) == 0 ||
|
||||||
imageRectLeft->encoding.compare(sensor_msgs::image_encodings::RGB8) == 0) ||
|
imageRectLeft->encoding.compare(sensor_msgs::image_encodings::RGB8) == 0 ||
|
||||||
|
imageRectLeft->encoding.compare(sensor_msgs::image_encodings::BGRA8) == 0 ||
|
||||||
|
imageRectLeft->encoding.compare(sensor_msgs::image_encodings::RGBA8) == 0) ||
|
||||||
!(imageRectRight->encoding.compare(sensor_msgs::image_encodings::MONO8) ==0 ||
|
!(imageRectRight->encoding.compare(sensor_msgs::image_encodings::MONO8) ==0 ||
|
||||||
imageRectRight->encoding.compare(sensor_msgs::image_encodings::MONO16) ==0 ||
|
imageRectRight->encoding.compare(sensor_msgs::image_encodings::MONO16) ==0 ||
|
||||||
imageRectRight->encoding.compare(sensor_msgs::image_encodings::BGR8) == 0 ||
|
imageRectRight->encoding.compare(sensor_msgs::image_encodings::BGR8) == 0 ||
|
||||||
imageRectRight->encoding.compare(sensor_msgs::image_encodings::RGB8) == 0))
|
imageRectRight->encoding.compare(sensor_msgs::image_encodings::RGB8) == 0 ||
|
||||||
|
imageRectRight->encoding.compare(sensor_msgs::image_encodings::BGRA8) == 0 ||
|
||||||
|
imageRectRight->encoding.compare(sensor_msgs::image_encodings::RGBA8) == 0))
|
||||||
{
|
{
|
||||||
NODELET_ERROR("Input type must be image=mono8,mono16,rgb8,bgr8 (mono8 recommended), received types are %s (left) and %s (right)",
|
NODELET_ERROR("Input type must be image=mono8,mono16,rgb8,bgr8,rgba8,bgra8 (mono8 recommended), received types are %s (left) and %s (right)",
|
||||||
imageRectLeft->encoding.c_str(), imageRectRight->encoding.c_str());
|
imageRectLeft->encoding.c_str(), imageRectRight->encoding.c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user