11 #define STB_IMAGE_WRITE_IMPLEMENTATION 12 #include "stb_image_write.h" 19 int main(
int argc,
char * argv[])
try 44 std::stringstream png_file;
46 stbi_write_png(png_file.str().c_str(), vf.get_width(), vf.get_height(),
47 vf.get_bytes_per_pixel(), vf.get_data(), vf.get_stride_in_bytes());
48 std::cout <<
"Saved " << png_file.str() << std::endl;
51 std::stringstream csv_file;
52 csv_file <<
"rs-save-to-disk-output-" << vf.get_profile().stream_name()
65 catch(
const std::exception & e)
frameset wait_for_frames(unsigned int timeout_ms=RS2_DEFAULT_TIMEOUT) const
const char * rs2_frame_metadata_to_string(rs2_frame_metadata_value metadata)
rs2_metadata_type get_frame_metadata(rs2_frame_metadata_value frame_metadata) const
stream_profile get_profile() const
bool supports_frame_metadata(rs2_frame_metadata_value frame_metadata) const
std::string stream_name() const
GLsizei const GLchar *const * string
const std::string & get_failed_args() const
rs2::frame process(rs2::frame frame) const override
void metadata_to_csv(const rs2::frame &frm, const std::string &filename)
const char * rs2_stream_to_string(rs2_stream stream)
STBIWDEF int stbi_write_png(char const *filename, int w, int h, int comp, const void *data, int stride_in_bytes)
rs2_stream stream_type() const
int main(int argc, char *argv[])
const std::string & get_failed_function() const
rs2_frame_metadata_value
Per-Frame-Metadata is the set of read-only properties that might be exposed for each individual frame...