ATUAV_RT.EmdatProcessor.ProcessWindow C# (CSharp) Method

ProcessWindow() public method

Uses EMDAT to process gaze point, fixation, and AOI data and generate features.
public ProcessWindow ( ) : void
return void
        public void ProcessWindow()
        {
            lock (this)
            {
                try
                {
                    IDictionary<Object, Object> features = emdat.generate_features(SegmentId, RawGazePoints, RawFixations, aoiDefinitions);
                    if (features != null)
                    {
                        this.features = features;
                    }
                    else
                    {
                        this.features.Clear();
                    }
                }
                catch (Exception e)
                {
                    System.Console.WriteLine(e);
                }
                finally
                {
                    if (!cumulativeData)
                    {
                        fixations.Clear();
                        gazePoints.Clear();
                    }
                }
            }
        }

Same methods

EmdatProcessor::ProcessWindow ( bool keepData ) : void

Usage Example

コード例 #1
0
ファイル: Program.cs プロジェクト: ATUAV/ATUAV
        /// <summary>
        /// Connects to found eyetrackers, synchronizes CPU and eyetracker clocks, and attaches event handlers.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e">Contains found EyetrackerInfo</param>
        static void EyetrackerFound(object sender, EyetrackerInfoEventArgs e)
        {
            EyetrackerConnector connector = new EyetrackerConnector(e.EyetrackerInfo);

            connector.Connect();

            // sync CPU and Eyetracker clocks
            SyncManager syncManager = new SyncManager(clock, e.EyetrackerInfo, EventThreadingOptions.BackgroundThread);

            // detect fixations
            FixationDetector fixations = new FixationDetector(syncManager);

            connector.Eyetracker.GazeDataReceived += fixations.GazeDataReceived;

            /*/ 1. print each event to console
             * ConsolePrinter printer = new ConsolePrinter(syncManager);
             * //connector.Eyetracker.GazeDataReceived += printer.GazeDataReceived;
             * fixations.FixDetector.FixationEnd += printer.FixationEnd;//*/

            /*/ 2. windowed print to console
             * WindowingConsolePrinter printer = new WindowingConsolePrinter(syncManager);
             * //connector.Eyetracker.GazeDataReceived += printer.GazeDataReceived;
             * fixations.FixDetector.FixationEnd += printer.FixationEnd;
             *
             * printer.StartWindow();
             * while (true)
             * {
             *  Thread.Sleep(windowDuration);
             *  printer.ProcessWindow(cumulativeWindows);
             * }//*/

            // 3. process windows with EMDAT
            EmdatProcessor processor = new EmdatProcessor(syncManager);

            if (aoiFilePath != null)
            {
                processor.AoiFilePath = aoiFilePath;
            }

            connector.Eyetracker.GazeDataReceived += processor.GazeDataReceived;
            fixations.FixDetector.FixationEnd     += processor.FixationEnd;

            processor.StartWindow();
            while (true)
            {
                Thread.Sleep(windowDuration);
                processor.ProcessWindow(cumulativeWindows);
            }//*/
        }
All Usage Examples Of ATUAV_RT.EmdatProcessor::ProcessWindow