Ejemplo n.º 1
0
 private AnalyzeRequest CreateAnalyseRequest()
 {
     return(new AnalyzeRequest()
     {
         FindPoints = ResolveFindPoints(),
         Arrays = imageContainers.ToDictionary(x => x.Key, x => x.Value.GrayScaleImage),
         SubsetDelta = int.Parse(subsetDeltaTextbox.Text),
         WindowDelta = int.Parse(windowDeltaTextbox.Text),
         PointsinX = int.Parse(pointsXTextbox.Text),
         PointsinY = int.Parse(pointsYTextbox.Text),
         StartingVertexes = square.CalculateStartingVertexes(int.Parse(pointsXTextbox.Text), int.Parse(pointsYTextbox.Text)),
         BitmapHeight = CurrentImageContainer.BitmapHeight,
         BitmapWidth = CurrentImageContainer.BitmapWidth,
         Size = imageContainers.Count,
         Square = square
     });
 }
Ejemplo n.º 2
0
        //[Arguments(10, 10, 600, 600, CalculationType.Gpu)]
        public void AnalyzeImages(int SubsetDelta, int WindowDelta, int PointsinX, int PointsinY, CalculationType calculationType)
        {
            var            firstImage = ImageContainers.First().Value;
            var            square     = new SquareLocation(firstImage.BitmapWidth, firstImage.BitmapHeight);
            AnalyzeRequest request    = new AnalyzeRequest()
            {
                FindPoints       = ResolveFindPoints(calculationType),
                Arrays           = ImageContainers.ToDictionary(x => x.Key, x => x.Value.GrayScaleImage),
                SubsetDelta      = SubsetDelta,
                WindowDelta      = WindowDelta,
                PointsinX        = PointsinX,
                PointsinY        = PointsinY,
                StartingVertexes = square.CalculateStartingVertexes(PointsinX, PointsinY),
                BitmapHeight     = firstImage.BitmapHeight,
                BitmapWidth      = firstImage.BitmapWidth,
                Square           = square,
                Size             = ImageContainers.Count
            };
            var imageprocessor = new ImageProcessor(backgroundWorker, request);

            imageprocessor.Analyze(new DoWorkEventArgs(null));
        }