BundleFusion icon indicating copy to clipboard operation
BundleFusion copied to clipboard

frame-XXXXXX.pose.txt

Open zhujiawen1994 opened this issue 6 years ago • 4 comments

Hello,sir, I would like to know if I want to get the pose information of camera about each frame , that is, the transformation Ti = Ri p + ti (rotation Ri , translation ti ) in the paper, which files should I refer to?

zhujiawen1994 avatar Dec 27 '18 13:12 zhujiawen1994

I want to know t, too

Tomas-Lee avatar Oct 16 '19 08:10 Tomas-Lee

You know that after bundlefusion is operated, frame-XXXXXX.pose.txt wrapped in your .sens file is updated. You can translate the newest .sens file into color ones, depth ones and pose ones, then you can each camera pose information for each frame.

Serena2018 avatar Aug 20 '20 09:08 Serena2018

@Serena2018 could you elaborate more about "translate the newest .sens file into color ones, depth ones and pose ones, then you can each camera pose information for each frame. how to do it

@zhujiawen1994 @Tomas-Lee if any one know how to get the frame-XXXXXX.pose.txt please explain me know how to get it

chethanab16 avatar Nov 25 '20 02:11 chethanab16

The functionality for it is already in the PoseHelper.h file, So I added a few lines to deinitBundleFusion in BundleFusion.cpp (few lines above and below given so you can find it in the source code):

#ifdef RUN_MULTITHREADED
g_bundler->exitBundlingThread();

g_imageManager->setBundlingFrameRdy();			//release all bundling locks
g_bundler->confirmProcessedInputFrame();		//release all bundling locks
ConditionManager::release ( ConditionManager::Recon ); // release bundling locks

//NEW CODE HERE
std::vector<mat4f> trajectory;
g_bundler->getTrajectoryManager()->getOptimizedTransforms ( trajectory );
PoseHelper::saveToPoseFile(GlobalAppState::get().s_generateMeshDir + "poseFile.txt",trajectory);

if ( bundlingThread->joinable() )
    bundlingThread->join();	//wait for the bundling thread to return;
#endif 

This should be run if you press 'q' to exit and shutdown the visualisation, and output poseFile.txt in the directory where a mesh would be saved, as specified by s_generateMeshDir in zParametersDefault.txt Some of the code is copied from processInputRGBDFrame in BundlFusion.cpp, where there is a section for publish_mesh to the visualisation - it gets the trajectory, splits it into positions and camera poses to draw to the visualisation. I just sent the trajectories before splitting into the PoseHelper::saveToPoseFile function. Some of the values can be expressed in scientific notation.

ph-code-repo avatar Mar 10 '22 15:03 ph-code-repo