示例#1
0
        public void ProcessImage(IImage image)
        {
            var imageForProcessing = image.Clone();

            _edgeFilter.ProcessImage(imageForProcessing);
            var segments = _segmentationAlgorithm.ProcessImage(imageForProcessing);
            IEnumerable <IFindResult> findResult = _segmentFindAnalyzer.Find(segments);

            _findResultDrawer.DrawFindResults(image, findResult);
        }
示例#2
0
        public Task <ICarNumberIdentifyResult> IdentifyAsync(IImage inputImage)
        {
            var result = new IdentifyIdentifyResult();

            var imageClone = inputImage.Clone();
            var segments   = _segmentationAlgoritm.ProcessImage(imageClone);

            var selectedAreas = _segmentFindAnalyzer.Find(segments);

            _findResultDrawer.DrawFindResults(inputImage, selectedAreas);
            result.ProcessedImage = inputImage;

            return(Task.FromResult((ICarNumberIdentifyResult)result));
        }
示例#3
0
        public void ProcessImage(IImage inputImage)
        {
            var segments = _segmentationAlgoritm.ProcessImage(inputImage);

            var image = segments.SegmentationMatrix;

            for (int j = 0; j < inputImage.Height; j++)
            {
                for (int i = 0; i < inputImage.Width; i++)
                {
                    var random = new Random(image[i, j]);
                    var pixel  = new Pixel {
                        R = (byte)random.Next(255), G = (byte)random.Next(255), B = (byte)random.Next(255)
                    };
                    inputImage.SetPixel(i, j, pixel);
                }
            }
        }