11#ifndef FacadeSingleton_hpp
12#define FacadeSingleton_hpp
14#include "../Command/SystemCommand.hpp"
15#include "../Managers/RealSenseManagers/RealSenseManager.hpp"
16#include "../Managers/OutputManagers/OutputManager.hpp"
17#include "../Managers/OpenCV_Manager.hpp"
18#include "../Managers/UsageManager.hpp"
19#include "../Managers/CoordinateManagers/CoordinateMappingManager.hpp"
20#include "../Managers/ImageManager.hpp"
21#include "../Managers/KafkaManager.hpp"
258 void startEnvironment (rs2::pipeline & pipelineStream,
struct rs2_intrinsics & color_intrin,
float * scale,
259 unsigned short int resX,
unsigned short int resY,
const char * destinationKafkaTopic,
Room room);
274 void getVideoFrames (
unsigned int user_nFrame, rs2::pipeline & pipelineStream,
float scale,
const unsigned short int framesToSkip);
289 void showSkeletons (
unsigned int user_nFrame,
const float skeletonThreshold);
296 void sendData (
unsigned int user_nFrame);
The CoordinateMappingManager class is a class that is responsible for converting coordinates values f...
FacadeSingleton class is used as a single access point to a simplified interface.
RealSenseManager * cameraManager
A pointer to RealSenseManager object. A RealSenseManager object is responsible for handling the camer...
CoordinateMappingManager * getCoordinateMappingManager(void)
Get the CoordinateMappingManager pointer.
void showSkeletons(unsigned int user_nFrame, const float skeletonThreshold)
Retrieve OpenPose's output, convert it to RealSense coordinate's space, show results and save them.
void setOutputManager(OutputManager *outputManager)
Set the OutputManager pointer.
void setUsageManager(UsageManager *usageManager)
Set the UsageManager pointer.
CoordinateMappingManager * coordinateMappingManager
A pointer to CoordinateMappingManager object. A CoordinateMappingManager object is responsible for tr...
void startEnvironment(rs2::pipeline &pipelineStream, struct rs2_intrinsics &color_intrin, float *scale, unsigned short int resX, unsigned short int resY, const char *destinationKafkaTopic, Room room)
This method is useful to invoke at the boot of the program where we want to initialize the different ...
void setImageManager(ImageManager *imageManager)
Set the ImageManager pointer.
OpenCV_Manager * getOpenCV_Manager(void)
Get the OpenCV_Manager pointer.
ImageManager * getImageManager(void)
Get the ImageManager pointer.
FacadeSingleton(FacadeSingleton &other)=delete
Disabling the possibility to clone the Singleton object. Singletons should not be cloneable.
KafkaManager * kafkaManager
A pointer to KafkaManager object. A KafkaManager object is responsible for sending previously produce...
ImageManager * imageManager
A pointer to CoordinateMappingManager object. A CoordinateMappingManager object is responsible for br...
static std::mutex singletonMutex
Mutex for thread-safe access.
void setCoordinateMappingManager(CoordinateMappingManager *coordinateMappingManager)
Set the CoordinateMappingManager pointer.
OutputManager * outputManager
A pointer to OutputManager object. An OutputManager object is responsible for handling the final outp...
void setOpenCV_Manager(OpenCV_Manager *openCV_Manager)
Set the OpenCV_Manager pointer.
void setKafkaManager(KafkaManager *kafkaManager)
Set the KafkaManager pointer.
UsageManager * usageManager
A pointer to UsageManager object. An UsageManager object is responsible for checking if the parameter...
void getVideoBodyKeyPoints(int *argc, char ***argv)
Start and execute OpenPose submodule.
static FacadeSingleton * sharedInstance
The field for storing the singleton instance.
~FacadeSingleton(void)
Destroy the Facade Singleton object.
OpenCV_Manager * openCV_Manager
A pointer to OpenCV_Manager object. An OpenCV_Manager object is responsible for converting camera fra...
OutputManager * getOutputManager(void)
Get the OutputManager pointer.
void setCameraManager(RealSenseManager *cameraManager)
Set the RealSenseManager pointer.
UsageManager * getUsageManager(void)
Get the UsageManager pointer.
void getVideoFrames(unsigned int user_nFrame, rs2::pipeline &pipelineStream, float scale, const unsigned short int framesToSkip)
Get user_nFrame video frames from the pipeline by applying a specific scaling factor.
RealSenseManager * getCameraManager(void)
Get the RealSenseManager pointer.
void cleanBuildFolder(void)
This method cleans the build folder, in order to prepare the environment for the next loop iteration....
FacadeSingleton(const int expected_argc=0, const char *expectedUsageMessage=nullptr)
Construct a new Facade Singleton object.
void sendData(unsigned int user_nFrame)
Send saved results by getVideoBodyKeyPoints(...) via Kafka using the KafkaManager.
void operator=(const FacadeSingleton &)=delete
Disabling the possibility to assign a Singleton object. Singletons should not be assignable.
static FacadeSingleton * getInstance(void)
Get the unique class instance. This methods should be called in the following scenario: when we just ...
KafkaManager * getKafkaManager(void)
Get the KafkaManager pointer.
ImageManager class is a general-purpose class useful for operations on images such as loading,...
Kafka class is a class that is responsible to send all generated output data, via Apache Kafka techno...
OpenCV_Manager class is used for general-purpose tasks on the captured frames.
OutputManager class is a class that abstracts final output-producing operations. An output format inh...
RealSenseManager class is a class that abstracts the behavior of an Intel RealSense Camera,...
Room class represents the Room abstraction. A Room object has different specifications,...
UsageManager class is a utility class that helps with configuration parameters.
const char * expectedUsageMessage