4 #ifndef __RS_CONVERTER_CONVERTER_PNG_H 5 #define __RS_CONVERTER_CONVERTER_PNG_H 9 #define STB_IMAGE_WRITE_IMPLEMENTATION 10 #include "stb_image_write.h" 12 #include "../converter.hpp" 27 , _streamType(streamType)
31 std::string
name()
const override 33 return "PNG converter";
53 videoframe = _colorizer.
process(videoframe);
59 <<
"_" << std::setprecision(14) << std::fixed << videoframe.
get_timestamp()
62 std::stringstream metadata_file;
63 metadata_file << _filePath
65 <<
"_metadata_" << std::setprecision(14) << std::fixed << videoframe.
get_timestamp()
68 std::string filenameS = filename.str();
69 std::string metadataS = metadata_file.str();
72 [filenameS, metadataS, videoframe] {
int get_bytes_per_pixel() const
std::string stream_name() const
double get_timestamp() const
rs2::frame process(rs2::frame frame) const override
rs2_stream
Streams are different types of data provided by RealSense devices.
const void * get_data() const
STBIWDEF int stbi_write_png(char const *filename, int w, int h, int comp, const void *data, int stride_in_bytes)
int get_stride_in_bytes() const
rs2_stream stream_type() const
stream_profile get_profile() const