Skip to content

Instantly share code, notes, and snippets.

View MatsumotoJ's full-sized avatar

Jumpei Matsumoto MatsumotoJ

  • University of Toyama
  • Toyama, Japan
View GitHub Profile
@MatsumotoJ
MatsumotoJ / multicam_bagfile_playback_example.cpp
Created June 4, 2018 07:37
Synchronized playback of rosbag files recorded with multiple cameras (https://github.com/IntelRealSense/librealsense/issues/1810)
#include <iostream>
#include <vector>
#include <librealsense2\rs.hpp>
// loadbagfile: load a bag file to a pipeline
void loadbagfile(rs2::pipeline & pipe, std::string filename)
{
rs2::config cfg;
cfg.enable_device_from_file(filename);
@MatsumotoJ
MatsumotoJ / TDUT_beta.py
Created February 8, 2018 03:53
functions to read pre-processed point cloud data made by 3DTracker (www.3dtracker.org; beta version)
import numpy as np
import struct
def get_fname(fname_metadata, str_ext):
n = fname_metadata.find('.metadata.xml')
base = fname_metadata[0:n]
return base+str_ext
# call this function to read the file (fname_metadata = path of *.metadata.xml; i_frame = frame no. to read)
def load_mrgpc(fname_metadata, i_frame):