|
DFX Extraction library v4.14.5
enabling applications to perform DFX blood flow analysis
|
16 #ifndef LIBDFX_COLLECTOR_H
17 #define LIBDFX_COLLECTOR_H
19 #include "dfx/ChunkData.h"
21 #include "dfx/Frame.h"
22 #include "dfx/MeasurementResult.h"
116 virtual bool prepareMeasurement(
const std::vector<uint8_t>& createMeasurementPayload) = 0;
140 virtual std::string
getMode()
const = 0;
284 virtual bool setConstraintsConfig(
const std::string& key,
const std::string &propertyValue) = 0;
377 virtual std::shared_ptr<dfx::ChunkData>
getChunkData() = 0;
389 virtual std::shared_ptr<dfx::MeasurementResult>
decodeMeasurementResult(
const std::vector<uint8_t>& measurementResponse) = 0;
406 virtual bool setProperty(
const std::string &key,
const std::string &value) = 0;
417 virtual std::string
getProperty(
const std::string& key) = 0;
433 virtual std::map<std::string, std::string>
getProperties() = 0;
499 virtual bool setFaceAttribute(
const std::string& faceID, FaceAttribute key, FaceAttributeValue value) = 0;
509 virtual bool setFaceAttribute(
const std::string& faceID, FaceAttribute key,
double value) = 0;
529 virtual bool initializeModel(int8_t modelType,
const std::vector<unsigned char> &data) = 0;
533 #endif // LIBDFX_COLLECTOR_H
virtual CollectorState defineRegions(std::shared_ptr< dfx::Frame > &frame)=0
Define the regions of interest based upon the MPEG-4 Facial Data Points.
virtual bool isChunkReady() const =0
Identifies when a measurement has collected sufficient information to make a server request.
virtual bool setConstraintsConfig(const std::string &key, const std::string &propertyValue)=0
Configures the constraint system properties.
virtual void resetCollection()=0
Resets the measurement state to construct a new chunk.
virtual std::string getLastErrorMessage()=0
If there was an error getLastErrorMessage may contain more information about why the error occurred.
virtual bool setNumberChunks(uint32_t numberChunks)=0
Sets number of chunks before the measurement is complete.
virtual bool initializeModel(int8_t modelType, const std::vector< unsigned char > &data)=0
Configures a model within the Collector.
Collector extracts region channel information from video frames for server signal processing.
Definition: Collector.h:70
virtual void cancelCollection()=0
Cancels the current collection.
virtual std::string getProperty(const std::string &key)=0
Returns a metadata property by key name if it exists.
virtual bool setTargetFPS(float targetFPS)=0
Identifies what the anticipated FPS is suppose to be.
virtual std::vector< std::string > getAvailableConstraints() const =0
Obtain all available constraint IDs.
virtual std::string getConstraintsConfig(const std::string &key)=0
Obtains a constraint system property.
virtual std::vector< std::string > getEnabledConstraints()=0
Returns the currently enabled constraints.
virtual bool enableConstraint(const std::string &constraintID)=0
Enable constraint handling for the identified constraint.
virtual uint32_t getNumberChunks()=0
Returns the total number of chunks the collector will process for this measurement.
virtual CollectorState extractChannels(std::shared_ptr< dfx::Frame > &frame)=0
Extracts the channels of interest from the video frame and regions of interest.
virtual bool disableConstraint(const std::string &constraintID)=0
Disable a constraint for the identified constraint.
virtual void removeProperty(const std::string &key)=0
Removes a metadata property by key name if it exists.
virtual std::shared_ptr< dfx::MeasurementResult > decodeMeasurementResult(const std::vector< uint8_t > &measurementResponse)=0
Decodes the binary measurement response payload from the server into a MeasurementResult.
CollectorState
A Collector state indicates whether a Collector is in error or ready to collect data.
Definition: Collector.h:53
virtual CollectorState startCollection()=0
When the client is ready to start a measurement they will notify the collector to start collecting da...
virtual void forceComplete()=0
Forces the completion of a collection.
Represents the internal structure for how image frames are passed to the DFX Engine since there is li...
Definition: VideoFrame.h:35
ConstraintResult
The possible constraint return values.
Definition: Collector.h:41
Definition: DFXErrors.h:34
virtual std::shared_ptr< dfx::ChunkData > getChunkData()=0
The measurement chunk data which has been collected up for the current chunk until this point.
virtual float getChunkDurationSeconds()=0
Returns the desired collected chunk duration in seconds.
virtual std::shared_ptr< dfx::Frame > createFrame(const dfx::VideoFrame &videoFrame)=0
Creates a Frame from a user supplied video frame.
virtual bool setProperty(const std::string &key, const std::string &value)=0
Client applications wishing to associate their own metadata properties can associate key=value string...
virtual bool setFaceAttribute(const std::string &faceID, FaceAttribute key, FaceAttributeValue value)=0
Add user data information to a payload using FaceAttribute key and values.
virtual std::map< std::string, std::string > getProperties()=0
Obtains the Chunk metadata for this measurement request.
virtual ~Collector()
Collector destructor.
Definition: Collector.h:75
Definition: ChunkData.h:21
virtual std::string getConstraintErrorMessage(const std::string &violationID)=0
Obtain a message which represents the violation ID.
virtual ConstraintResult checkConstraints(std::shared_ptr< dfx::Frame > &frame, std::vector< std::pair< std::string, dfx::ConstraintResult >> &results)=0
Check for constraint violations.
virtual std::vector< std::string > getRequiredPosePointIDs() const =0
Return the set of pose points for the configured study.
virtual std::string getMode() const =0
Returns the operating mode of the Collector.
virtual bool setCloudResultsFeedback(const std::string &jsonCloudResults)=0
Provide the cloud results to the Collector to potentially improve the result.
virtual bool setChunkDurationSeconds(float chunkDurationSeconds)=0
Sets the desired collected chunk duration in seconds.
virtual CollectorState getCollectorState()=0
The current internal state of this measurement collector.
virtual int32_t numberFramesNeeded() const =0
The approximate number of additional video frames required before sufficient information has been col...
virtual bool prepareMeasurement(const std::vector< uint8_t > &createMeasurementPayload)=0
When the client creates a new Measurement with the API, the Collector should be prepared with the API...
virtual void stopCollection()=0
Stop the current collection.