Add optional original, annotated and JSON frame outputs
This commit is contained in:
@@ -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_;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user