Re: RtabMap reads video/images from file
Posted by
matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/RtabMap-reads-video-images-from-file-tp1290p1310.html
Hi,
Well, good question. I think I have always used 16bits PNG. RTAB-Map is using this kind of code to determine if the resulting format is correct when reading a depth image with OpenCV:
cv::Mat img = cv::imread(imageFilePath.c_str(), cv::IMREAD_UNCHANGED);
if(img.type() != CV_16UC1 && img.type() != CV_32FC1)
{
UERROR("Depth format not supported (file = \"%s\"). "
"Formats supported are 16 bits 1 channel and 32 bits 1 channel.",
imageFilePath.c_str());
img = cv::Mat();
}
No matter the image type is (at least it should be recognized by OpenCV), the resulting matrix should be CV_16UC1 to CV_32FC1.
For a fast test, you can use
OpenCV python to check the format when reading your images.
cheers