Go to the documentation of this file.
25 #define CHUNK_SIZE 100
35 #include <opencv2/opencv.hpp>
38 #include <Image/ByteImage.h>
70 std::filesystem::path pathStem = getPath() / getStem();
74 std::filesystem::create_directory(pathStem);
77 writeMetadataLine(
"extension",
"string", getDotExtension().
string());
91 std::filesystem::path path = getPath() / getStem();
92 return std::filesystem::canonical(path) /
"metadata.csv";
99 const std::filesystem::path frame_filename = frame_name + getDotExtension().string();
103 unsigned int chunk_number = sequence_number /
CHUNK_SIZE;
105 std::filesystem::create_directory(std::filesystem::canonical(getPath() / getStem()) / m_frames_chunk);
108 return std::filesystem::canonical(getPath() / getStem() / m_frames_chunk) / frame_filename;
std::filesystem::path getMetadataPath() const override
Abstract interface of a recording strategy.
AbstractSequencedRecordingStrategy()
Default constructor to manually start the recording.
std::filesystem::path deriveFramePath(const unsigned int sequence_number, const std::string &frame_name)
Returns the next sequenced full path and increments the sequence number.
const std::string & to_string(const std::string &s)
std::filesystem::path getDotExtension() const override
Gets the extension plus preceeded dot of the configured file (e.g.
#define ARMARX_CHECK_EXPRESSION(expression)
This macro evaluates the expression and if it turns out to be false it will throw an ExpressionExcept...
virtual void startRecording()
Starts the recording manually if constructed empty.
~AbstractSequencedRecordingStrategy() override
Destruct the recording strategy.
void startRecording() override
Starts the recording manually if constructed empty.