/// <summary> /// Extended CTOR /// </summary> /// <param name="bodyId">Id of tracked body</param> /// <param name="faceFeature">Feature of the analytics</param> /// <param name="detectionResult">Most common detection result</param> /// <param name="perc">Percentage of occurence</param> private FaceFeatureAnalytics(ulong bodyId, FaceProperty faceFeature, DetectionResult detectionResult, double perc) { _bodyId = bodyId; _faceFeature = faceFeature; _detectionResult = detectionResult; _percentage = perc; }
/// <summary> /// Convert the FaceProperty and DetectionResult to a display string /// </summary> /// <param name="prop">The FaceProperty enum type</param> /// <param name="result">The DetectionResult of the FaceProperty</param> /// <returns></returns> private string FacePropertyToString(FaceProperty prop, DetectionResult result) { string str = ""; str += Enum.GetName(typeof(FaceProperty), prop) + ": "; str += Enum.GetName(typeof(DetectionResult), result) + "\n"; return(str); }
public DetectionResult GetDetectionState(FaceProperty faceProperty) { if (_BodyAttributesHistory.Count > 0) { return((DetectionResult)_BodyAttributesHistory.Select(o => o[faceProperty]).Average(o => Convert.ToDouble(o))); } else { return(DetectionResult.Unknown); } }
/// <summary> /// Extended CTOR /// </summary> /// <param name="faceProp">Face property that it will keep track of</param> /// <param name="bodyId">Id of the tracked body</param> public FaceFeatureTracker(FaceProperty faceProp, ulong bodyId) { _faceProperty = faceProp; _bodyId = bodyId; }
/// <summary> /// Convert the FaceProperty and DetectionResult to a display string /// </summary> /// <param name="prop">The FaceProperty enum type</param> /// <param name="result">The DetectionResult of the FaceProperty</param> /// <returns></returns> private string FacePropertyToString(FaceProperty prop, DetectionResult result) { string str = ""; str += Enum.GetName(typeof(FaceProperty), prop) + ": "; str += Enum.GetName(typeof(DetectionResult), result) + "\n"; return str; }