![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <RSBagReader.h>


Public Member Functions | |
| RSBagReader (size_t buffer_size=DEFAULT_BUFFER_SIZE) | |
| RSBagReader (const RSBagReader &)=delete | |
| RSBagReader & | operator= (const RSBagReader &)=delete |
| virtual | ~RSBagReader () |
| virtual bool | IsOpened () const override |
| Check If the RSBag file is opened. More... | |
| virtual bool | IsEOF () const override |
| Check if the RSBag file is all read. More... | |
| virtual bool | Open (const std::string &filename) override |
| virtual void | Close () override |
| Close the opened RSBag playback. More... | |
| virtual const RGBDVideoMetadata & | GetMetadata () const override |
| Get (read-only) metadata of the playback. More... | |
| virtual RGBDVideoMetadata & | GetMetadata () override |
| Get reference to the metadata of the RGBD video playback. More... | |
| virtual bool | SeekTimestamp (uint64_t timestamp) override |
| virtual uint64_t | GetTimestamp () const override |
| Get current timestamp (in us). More... | |
| virtual t::geometry::RGBDImage | NextFrame () override |
| Copy next frame from the bag file and return the RGBDImage object. More... | |
| virtual std::string | GetFilename () const override |
| Return filename being read. More... | |
| virtual void | SaveFrames (const std::string &frame_path, uint64_t start_time_us=0, uint64_t end_time_us=UINT64_MAX) |
| virtual std::string | ToString () const |
| Text description. More... | |
Public Member Functions inherited from cloudViewer::t::io::RGBDVideoReader | |
| RGBDVideoReader () | |
| virtual | ~RGBDVideoReader () |
| virtual void | SaveFrames (const std::string &frame_path, uint64_t start_time_us=0, uint64_t end_time_us=UINT64_MAX) |
| virtual std::string | ToString () const |
| Text description. More... | |
Static Public Attributes | |
| static const size_t | DEFAULT_BUFFER_SIZE = 32 |
Additional Inherited Members | |
Static Public Member Functions inherited from cloudViewer::t::io::RGBDVideoReader | |
| static std::unique_ptr< RGBDVideoReader > | Create (const std::string &filename) |
| Factory function to create object based on RGBD video file type. More... | |
RealSense Bag file reader.
Only the first color and depth streams from the bag file will be read.
Note: A few frames may be dropped if user code takes a long time (>10 frame intervals) to process a frame.
Definition at line 49 of file RSBagReader.h.
|
explicit |
Constructor
| buffer_size | (optional) Max number of frames to store in the frame buffer |
Definition at line 35 of file RSBagReader.cpp.
|
delete |
|
virtual |
Definition at line 40 of file RSBagReader.cpp.
References Close(), and IsOpened().
|
overridevirtual |
Close the opened RSBag playback.
Implements cloudViewer::t::io::RGBDVideoReader.
Definition at line 77 of file RSBagReader.cpp.
Referenced by Open(), cloudViewer::t::io::pybind_sensor(), and ~RSBagReader().
|
inlineoverridevirtual |
Return filename being read.
Implements cloudViewer::t::io::RGBDVideoReader.
Definition at line 97 of file RSBagReader.h.
|
inlineoverridevirtual |
Get (read-only) metadata of the playback.
Implements cloudViewer::t::io::RGBDVideoReader.
Definition at line 78 of file RSBagReader.h.
Referenced by cloudViewer::t::io::pybind_sensor().
|
inlineoverridevirtual |
Get reference to the metadata of the RGBD video playback.
Implements cloudViewer::t::io::RGBDVideoReader.
Definition at line 83 of file RSBagReader.h.
|
overridevirtual |
Get current timestamp (in us).
Implements cloudViewer::t::io::RGBDVideoReader.
Definition at line 211 of file RSBagReader.cpp.
References IsOpened(), and LogWarning.
Referenced by cloudViewer::t::io::pybind_sensor().
|
overridevirtual |
Check if the RSBag file is all read.
Implements cloudViewer::t::io::RGBDVideoReader.
Definition at line 167 of file RSBagReader.cpp.
Referenced by cloudViewer::t::io::pybind_sensor().
|
inlineoverridevirtual |
Check If the RSBag file is opened.
Implements cloudViewer::t::io::RGBDVideoReader.
Definition at line 64 of file RSBagReader.h.
Referenced by GetTimestamp(), NextFrame(), Open(), cloudViewer::t::io::pybind_sensor(), SeekTimestamp(), and ~RSBagReader().
|
overridevirtual |
Copy next frame from the bag file and return the RGBDImage object.
Implements cloudViewer::t::io::RGBDVideoReader.
Definition at line 169 of file RSBagReader.cpp.
References cloudViewer::t::io::RGBDVideoMetadata::fps_, IsOpened(), LogError, and LogInfo.
Referenced by cloudViewer::t::io::pybind_sensor().
|
overridevirtual |
Open an RGBD Video playback.
| filename | Path to the RSBag file. |
Implements cloudViewer::t::io::RGBDVideoReader.
Definition at line 44 of file RSBagReader.cpp.
References Close(), cloudViewer::t::io::RGBDVideoMetadata::ConvertFromJsonValue(), error(), filename, cloudViewer::t::io::RealSenseSensorConfig::GetMetadataJson(), cloudViewer::t::io::RealSenseSensorConfig::GetPixelDtypes(), IsOpened(), LogInfo, LogWarning, and profile.
Referenced by cloudViewer::t::io::pybind_sensor(), and SeekTimestamp().
|
delete |
| void cloudViewer::t::io::RGBDVideoReader::SaveFrames |
Save synchronized and aligned individual frames to subfolders.
| frame_path | Frames will be stored in stream subfolders 'color' and 'depth' here. The intrinsic camera calibration for the color stream will be saved in 'intrinsic.json'. |
| start_time_us | (default 0) Start saving frames from this time (us) |
| end_time_us | (default video length) Save frames till this time (us) |
Definition at line 62 of file RGBDVideoReader.cpp.
Referenced by cloudViewer::t::io::pybind_sensor().
|
overridevirtual |
Seek to the timestamp (in us).
| timestamp | Time in us to seek to. |
Implements cloudViewer::t::io::RGBDVideoReader.
Definition at line 192 of file RSBagReader.cpp.
References IsOpened(), LogWarning, Open(), and cloudViewer::t::io::RGBDVideoMetadata::stream_length_usec_.
Referenced by cloudViewer::t::io::pybind_sensor().
| std::string cloudViewer::t::io::RGBDVideoReader::ToString |
Text description.
Definition at line 70 of file RGBDVideoReader.cpp.
Referenced by cloudViewer::t::io::pybind_sensor().
|
static |
Definition at line 51 of file RSBagReader.h.
Referenced by cloudViewer::t::io::pybind_sensor().