build map with mobile data but out of shape easily

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

build map with mobile data but out of shape easily

derwee
Hi Matlabbe,

I modified logic base /rtabmap/tools/CameraRGBD/main.cpp. This program read one rgb picture and depth picture from mobile phone at the same time instead of RGBD camera. We struggle with some problems.
(1) The clound is out of shape easily, when amplifying or reducing
(2) depth image is repeated by piece

Is there something wrong with CameraModel or other cause? many thanks in advance.

rtabmap::Transform t1=rtabmap::Transform(0,0,1,0, -1,0,0,0, 0,-1,0,0);
rtabmap::CameraModel model(
                570.342163, //fx
                                                570.342224, //fy
                                                319.500000,  //cx
                                                239.500000,  //cy
                                                t1);

cv::Mat depth;
depth =cv::Mat(480, 640, CV_16UC1,cv::imread("reeman_depth1.jpg").data);
rtabmap::SensorData data;
data.setCameraModel(model);
data.setDepthOrRightRaw(depth);
data.setImageRaw(cv::imread("reeman1.jpg"));
data.setId(0);
data.setStamp(1.0);



Reply | Threaded
Open this post in threaded view
|

Re: build map with mobile data but out of shape easily

matlabbe
Administrator
RTAB-Map assumes that 16UC1 format is in mm and that 32FC1 format is in meters. JPG may generate many depth artifacts, use PNG instead. Examples of depth images can be found on the RGBD-SLAM datasets site.

There is also a code example on how depth images are loaded in rtabmap, see here.

cheers