31 #include <opencv2/opencv.hpp>
42 const std::filesystem::path& filePath,
43 const std::string& name,
44 unsigned int jpg_quality) :
46 m_jpg_quality{jpg_quality}
62 writeMetadataLine(
"jpg_quality",
"unsigned int",
std::to_string(m_jpg_quality));
67 const std::chrono::microseconds
timestamp)
69 const auto& [sequence_number, frame_name] = writeMetadataFrame(frame,
timestamp);
70 const std::filesystem::path path = deriveFramePath(sequence_number, frame_name);
71 std::vector<int> params{cv::IMWRITE_JPEG_QUALITY,
static_cast<int>(m_jpg_quality)};
72 cv::imwrite(path.string(), frame, params);