Exemplo n.º 1
0
        /// <summary>
        /// Process a batch of images and handle feedback
        /// </summary>
        /// <param name="images">A batch of input images</param>
        /// <returns></returns>
        private async Task ProcessAsync(List <HImage> images)
        {
            var findLineConfigs = new FindLineConfigs(FindLineParams.ToList(), FindLineLocationsRelativeValues);

            var result =
                await Task.Run(() =>
                               MeasurementUnit.ProcessAsync(images, findLineConfigs, FaiItems, IndexToShow,
                                                            RunStatusMessageQueue));


            InfoImage.DispImage(WindowHandle);

            if (WindowHandle != null)
            {
                result.HalconGraphics.DisplayGraphics(WindowHandle);
                result.DataRecorder.DisplayPoints(WindowHandle);
            }

            result.DataRecorder.Serialize(CsvDir + "/DebuggingData.csv");
            UpdateFaiItems(result.FaiDictionary);
            CsvSerializer.Serialize(FaiItems, ImageNames[CurrentIndex]);
        }