Go to the documentation of this file.
25 #define CHUNK_SIZE 100
35 #include <opencv2/opencv.hpp>
38 #include <Image/ByteImage.h>
52 const std::filesystem::path& filePath,
53 const std::filesystem::path& ext) :
68 std::filesystem::path pathStem = getPath() / getStem();
72 std::filesystem::create_directory(pathStem);
75 writeMetadataLine(
"extension",
"string", getDotExtension().
string());
87 std::filesystem::path path = getPath() / getStem();
88 return std::filesystem::canonical(path) /
"metadata.csv";
93 const unsigned int sequence_number,
94 const std::string& frame_name)
96 const std::filesystem::path frame_filename = frame_name + getDotExtension().string();
100 unsigned int chunk_number = sequence_number /
CHUNK_SIZE;
102 std::filesystem::create_directory(std::filesystem::canonical(getPath() / getStem()) /
106 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.