jzhzhang / ROSEFusion

[SIGGRAPH 2021] ROSEFusion is proposed to tackle the difficulties in fast-motion camera tracking using random optimization with depth information only.
GNU General Public License v3.0
303 stars 48 forks source link

strange display #12

Closed ronaldpan closed 2 years ago

ronaldpan commented 2 years ago

ROSEFusion example_camera.yaml example_data.yaml example_controller.yaml I got this strange display 屏幕截图 2022-01-15 104451 What is wrong with it?

jzhzhang commented 2 years ago

This may be related to the visualization framework. Could you please tell me the version of your Pangolin?

And is there anything wrong with the results, like trajectory or reconstructed scene?

ronaldpan commented 2 years ago

I correct the bug as follows: ` void DataReader::readFile() { for (int i=0;i<numFrames;i++){ char depth_buffer = new char[heightwidth2]; auto tmp = fread(depth_buffer,heightwidth*2,1,fp); assert(tmp);

    uchar* color_buffer = new uchar[height * width * 3];
    tmp = fread(color_buffer,height*width*3,1,fp);
    assert(tmp);

    v_color.push_back(cv::Mat(height,width,CV_8UC3,color_buffer).clone());
    v_depth.push_back(cv::Mat(height,width,CV_16UC1,depth_buffer).clone());
    delete[]depth_buffer;
    delete[]color_buffer;
}

} `

jzhzhang commented 2 years ago

@ronaldpan Great! Thanks for pointing it out.

I will review and update the code in the near future.