コード例 #1
0
        public static async Task <Session> Start(CameraObject cameraObject, string name, string fileOutput = null)
        {
            if (sourcesOpen.Any(i => i.Equals(cameraObject.Name)))
            {
                return(null);
            }
            var session = new Session()
            {
                IsSourceFromCamera = true,
                Source             = cameraObject.ToString(),
                FileOutput         = fileOutput,
                Name = name
            };

            session.Datastore = await Datastore.Initialize(session);

            session.FrameSource = await FrameSource.Initialize(session);

            session.GridProjection = await GridProjection.Initialize(session);

            session.Logger = await Logger.Initialize(session);

            session.HumanDetector = await HumanDetector.Initialize(session);

            sourcesOpen.Add(cameraObject.ToString());
            return(session);
        }
コード例 #2
0
 public void Stop()
 {
     FrameSource.Stop();
     sourcesOpen.RemoveAll(i => i.Equals(Source));
 }