![]() |
DFX Extraction library v4.14.5
enabling applications to perform DFX blood flow analysis
|
Frame is a wrapper which links a VideoFrame with one or more Face objects and additional state needed for regions and channel construction. More...
#include "dfx/Frame.h"
Public Member Functions | |
virtual | ~Frame () |
Frame destructor. | |
virtual VideoFrame | getVideoFrame () const =0 |
Convenience method to retrieve the VideoFrame associated with this Frame instance. More... | |
virtual bool | addFace (std::shared_ptr< dfx::Face > face)=0 |
Add a face and associated data to the frame. More... | |
virtual std::vector< float > | getQualityMetrics (float iso, float exposure)=0 |
Calculates the quality metrics for the current frame. More... | |
virtual std::vector< float > | getOpticalQualityMetrics ()=0 |
Calculates the optical quality metrics for the current frame. More... | |
virtual int | getStarRating (std::string &feedback)=0 |
Provide the 5-star rating value for the current frame, available after a call to getQualityMetrics. More... | |
virtual int | getOpticalQualityRating (std::string &feedback)=0 |
Provide the 5-star rating value for the current frame, available after a call to getOpticalQualityMetrics. More... | |
virtual bool | addMarker (const std::string &label)=0 |
Adds a marker/label to a video frame. More... | |
virtual std::vector< std::string > | getMarkers () const =0 |
Returns the marker/labels in a video frame. More... | |
virtual std::vector< std::string > | getDesiredFaceAttributes () const =0 |
Returns a list of desired face attributes for this frame. More... | |
virtual std::vector< std::string > | getDesiredDeviceAttributes () const =0 |
Returns a list of desired device attributes for this frame. More... | |
virtual double | getDeviceAttribute (const std::string &key) const =0 |
Returns the value of a device attribute if it exists or zero. More... | |
virtual void | setDeviceAttribute (const std::string &key, double value)=0 |
add a device attribute More... | |
virtual std::vector< std::string > | getFaceIdentifiers () const =0 |
obtain the known face identifiers within this frame. More... | |
virtual std::vector< std::string > | getRegionNames (const std::string &faceID) const =0 |
obtains the names of regions which are defined for the face within this frame. More... | |
virtual std::vector< cv::Point > | getRegionPolygon (const std::string &faceID, const std::string ®ionName) const =0 |
obtain the polygon for the region of interest. More... | |
virtual int32_t | getRegionIntProperty (const std::string &faceID, const std::string ®ionName, const std::string &property) const =0 |
Regions can have numeric properties attached to them. More... | |
virtual cv::Mat | getRegionHistogram (const std::string &faceID, const std::string ®ionName) const =0 |
obtain the histogram for a region of interest. More... | |
Frame is a wrapper which links a VideoFrame with one or more Face objects and additional state needed for regions and channel construction.
In addition to the video image, a Frame will have Faces and addition state. It also enables client applications to augment the Frame with markers and device data like Acceleration and Rotation data if available.
|
pure virtual |
Add a face and associated data to the frame.
Multiple faces can be added if an image contains multiple faces.
face | data to add to this Frame. |
|
pure virtual |
Adds a marker/label to a video frame.
If multiple events occur within a frame, multiple markers can be addedd and annotated against a frame.
label | the string marker identifier to add to the frame. |
|
pure virtual |
Returns a list of desired device attributes for this frame.
This enables the DFX engine to request additional properties like "acceleration", "rotation", etc. which it would like to have but which might not always be available depending upon the use case.
These attributes should be added with frame setDeviceAttribute() if they are available for the current frame.
|
pure virtual |
Returns a list of desired face attributes for this frame.
This enables the DFX engine to request additional properties like "age", "gender", "weight" etc. which it would like to have but which might not always be available depending upon the use case.
These attributes should be added to the Face attribute map if they are available for the current frame.
|
pure virtual |
Returns the value of a device attribute if it exists or zero.
key | the attribute name. |
|
pure virtual |
obtain the known face identifiers within this frame.
Every face is known by an identifier which uniquely identifies the face.
|
pure virtual |
Returns the marker/labels in a video frame.
|
pure virtual |
Calculates the optical quality metrics for the current frame.
|
pure virtual |
Provide the 5-star rating value for the current frame, available after a call to getOpticalQualityMetrics.
the | feedback string |
|
pure virtual |
Calculates the quality metrics for the current frame.
The provided ISO and exposure settings along with the current frame image data are used to construct a set of quality metrics which are used by the exposure algorithm to determine if the ISO needs to be increased or decreased to improve the image quality.
iso | the current iso setting |
exposure | the current exposure setting |
|
pure virtual |
obtain the histogram for a region of interest.
faceID | identifier for the face of interest. |
regionName | which histogram is desired. |
|
pure virtual |
Regions can have numeric properties attached to them.
faceID | identifier for the face of interest. |
regionName | to inspect the property of. |
property | to be returned |
|
pure virtual |
obtains the names of regions which are defined for the face within this frame.
faceID | identifier for the face of interest. |
|
pure virtual |
obtain the polygon for the region of interest.
faceID | identifier for the face of interest. |
regionName | which points are needed for drawing. |
|
pure virtual |
Provide the 5-star rating value for the current frame, available after a call to getQualityMetrics.
the | feedback string |
|
pure virtual |
Convenience method to retrieve the VideoFrame associated with this Frame instance.
return the associated VideoFrame
|
pure virtual |
add a device attribute
Device attributes are things like "acceleration" or "rotation".
When these attributes involve multiple values, like X and Y co-ordinates they should be expanded as "acceleration:x" and "acceleration:y".
key | the attribute name. |
value | the value of the attribute. |