예제 #1
0
 private void CloseCurrentProfile()
 {
     if (VideoSource == null) return;
     VideoSource.NewFrame -= VideoSourceOnNewFrame;
     VideoSource.Dispose();
     VideoSource = null;
     _objectTracker.Dispose();
     _objectTracker = null;
     _identificationService.Dispose();
     _identificationService = null;
 }
예제 #2
0
 public void LoadProfile(Profile profile)
 {
     CloseCurrentProfile();
     CurrentTrackedObjects.Clear();
     ArchivedObjects.Clear();
     Profile = profile;
     var identifier = CreateIdentifier();
     _identificationService = CreateIdService(identifier);
     _objectTracker = new ObjectTracker(profile.TrackerSettings);
     VideoSource = VideoSourceFactory.Create(profile);
     VideoSource.NewFrame += VideoSourceOnNewFrame;
 }