11#ifndef OutputManager_hpp
12#define OutputManager_hpp
20#include <json/value.h>
21#include <opencv2/core.hpp>
22#include "../../Points/Point3D.hpp"
23#include "../../Points/BodyKeyPoint.hpp"
24#include "../../Skeleton.hpp"
59 virtual Json::Value
makeOutputString (std::vector <Point3D *> skeletonPoints3D, std::vector <bool> bodyKeyPointsMap,
60 unsigned int frameID,
unsigned int personID) = 0;
84 Json::Value
makeOutputString (std::vector <Point3D *> skeletonPoints3D, std::vector <bool> bodyKeyPointsMap,
85 unsigned int frameID,
unsigned int personID)
override;
94 bool loadJSON (std::string filePathJSON, Json::Value & currentJSON);
99 void saveJSON (std::string filePath);
109 Json::Value
getValueAt (std::string key, Json::Value currentJSON);
116 Json::Value
getValueAt (
unsigned int i, Json::Value currentJSON);
124 Json::Value
getValueAt (std::string key,
unsigned int i, Json::Value currentJSON);
139 void createJSON (Json::Value & people, cv::Mat & colorImage, cv::Mat & distanceImage, cv::Mat & skeletonOnlyImage,
140 unsigned int nFrame,
const char * outputFolder,
const float skeletonThreshold);
OutputManagerJSON class is a class that abstracts final JSON output-producing operations.
void createJSON(Json::Value &people, cv::Mat &colorImage, cv::Mat &distanceImage, cv::Mat &skeletonOnlyImage, unsigned int nFrame, const char *outputFolder, const float skeletonThreshold)
This methods take a reference to a JSON node that represents all the people's informations within the...
Json::Value makeOutputString(std::vector< Point3D * > skeletonPoints3D, std::vector< bool > bodyKeyPointsMap, unsigned int frameID, unsigned int personID) override
This method is specific for saving the output in JSON format.
void saveJSON(std::string filePath)
Saves content present in the "stringOutputData" in a JSON file. The file path where to save the file ...
Json::Value getValueAt(std::string key, Json::Value currentJSON)
Utility method to get the value at a given key in a given JSON node.
bool loadJSON(std::string filePathJSON, Json::Value ¤tJSON)
Loads a JSON file and returns it as a reference. The JSON file path on disk is given.
OutputManager class is a class that abstracts final output-producing operations. An output format inh...
void setStringOutputData(std::string stringOutputData)
Set the output file's content.
virtual ~OutputManager()=default
Destroy the Output Manager object.
std::string getStringOutputData(void)
Get the output file's content.
virtual Json::Value makeOutputString(std::vector< Point3D * > skeletonPoints3D, std::vector< bool > bodyKeyPointsMap, unsigned int frameID, unsigned int personID)=0
This method has to be overridden from OutputManager's subclasses to fill the "stringOutputData" strin...
std::string stringOutputData
Output file's content.