Colored KinFu raising Error -213 "Not implemented in function 'integrate'", Request for minimal example

I tried to use the colored_kinfu with the realsense D455. I am not sure if I have everything set up correctly (hence not submitting an issue yet), but I would like some help with having the algorithm running.

Here’s the relevant snippet of my code:

using namespace cv;
using namespace cv::kinfu;

Ptr<ColoredKinFu> kf;
kf = ColoredKinFu::create(params); // params are some parameters

// d and rgb are data acquired from the depth camera

Mat H_depth(depth_h, depth_w, CV_16UC1, (void*)d.get_data());
UMat D_depth(depth_h, depth_w, CV_16UC1);
H_depth.copyTo(D_depth);
H_depth.release();

Mat H_rgb(rgb_h, rgb_w, CV_8UC3, (void*)rgb.get_data());
UMat D_rgb(rgb_h, rgb_w, CV_8UC3);
H_rgb.copyTo(D_rgb);
H_rgb.release();

bool success = kf->update(D_depth, D_rgb); // this line causes the error
// opencv_contrib-4.5.5/modules/rgbd/src/tsdf.hpp:105: error: (-213:The function/feature is not implemented) Not implemented in function 'integrate'

If somebody can explain what I did wrong, or provide an minimal working example of calling the update function I would really appreciate it.

If I need to provide any additional information, please let me know. Thanks in advnace!

most likely this is not your fault.
please check, if the colored kinfu sample shows the same problem (i bet it will) , then indeed raise an issue (as this needs talking to the author(s) of it)

I did check out the sample, and the sample was able to run without errors. In my code, I changed the params from defaultParams to coloredTSDFParams, which fixed this error.

However, there is still a major bug I am struggling with. I have displayed the point cloud (in MeshLab) of a scene with a red chair scanned with colored-kinfu and it looks like this

As you can see, the colors are there but mismatched with the wrong points. The code I used is linked here (3dmapping/rs-kinfu.cpp at master · jonah-chen/3dmapping · GitHub).

I used the ColoredKinFu::getCloud(OutputArray,OutputArray,OutputArray) function in colored_kinfu.hpp. Are the order of the list of points in the points, normals, and colors in the same order? as my experiments suggests otherwise, although there may be a bug in my code.

The code in the sample you sent me seems to work fine, but it never used the colors output in getCloud (as it does have a default value of noArray. I wonder if I am doing something wrong here if my objective is to output the XYZRGB info to a file.

Thank you in advance!