Exemplo n.º 1
0
 void OnFacesDetected(object sender, FacesEventArgs e)
 {
     foreach (var face in e.Faces)
     {
         noveltyLayers.Add(face, new NoveltyAttachment());
         face.PropertyChanged += Face_PropertyChanged;
     }
 }
Exemplo n.º 2
0
 void OnFacesRemoved(object sender, FacesEventArgs e)
 {
     foreach (var face in e.Faces)
     {
         face.PropertyChanged -= Face_PropertyChanged;
         var att = noveltyLayers [face];
         if (att.Layer != null)
         {
             att.Layer.RemoveFromSuperLayer();
         }
         noveltyLayers.Remove(face);
     }
 }