Add optional original, annotated and JSON frame outputs

This commit is contained in:
zmv
2026-09-23 20:37:55 +08:00
parent d24de544cb
commit 713bfd3672
15 changed files with 241 additions and 86 deletions
+20
View File
@@ -0,0 +1,20 @@
#pragma once
#include "frame_result.hpp"
#include <filesystem>
#include <string>
namespace cms {
struct OutputOptions {
bool original{},annotated{},results{};
std::filesystem::path directory;
bool enabled() const {return original||annotated||results;}
};
// Called by the inference worker; one matching filename stem per completed frame.
class OutputWriter {
public:
explicit OutputWriter(OutputOptions options);
void write(FrameResult const& result);
private:
OutputOptions options_;
std::string runId_;
};
}