Exemplo n.º 1
0
        public MosaicBuilderFactory(int holeWidth, int holeHeight, int averageDarkWidth, int averageDarkHeight, int fillHorizontalStep, int fillVerticalStep)
        {
            _imageLoader = new FlyWeightImageLoader(1000);
            _sourceRegionCreationStrategy      = new NonOverlappingRegionCreationStrategy(holeWidth, holeHeight);
            _averageDarkRegionCreationStrategy = new NonOverlappingRegionCreationStrategy(averageDarkWidth, averageDarkHeight);
            _fillRegionCreationStrategy        = new FixedSizeRegionCreationStrategy(holeWidth, holeHeight, fillHorizontalStep, fillVerticalStep);
            IImageComparer imageComparer = new TotalImageDifferenceComparer(_imageLoader);
            IFilterStrategy <ImageMatch> matchFilterMatchStrategy = new MatchFilterStrategy();

            _imageMatchProviderFactory = new ImageMatchProviderFactory(
                new ImageDataMatchingStrategy(imageComparer),
                new FillFilterStrategyFactory(),
                new Filter <ImageMatch>(matchFilterMatchStrategy));
        }
Exemplo n.º 2
0
 public MosaicBuilder(
     IImageLoader imageLoader,
     IRegionCreationStrategy sourceRegionCreationStrategy,
     IRegionCreationStrategy fillRegionCreationStrategy,
     IRegionCreationStrategy averageGreyRegionCreationStrategy,
     ImageMatchProviderFactory imageMatchProviderFactory,
     IImageDataSorter imageDataSorter)
 {
     _imageLoader = imageLoader;
     _sourceRegionCreationStrategy      = sourceRegionCreationStrategy;
     _fillRegionCreationStrategy        = fillRegionCreationStrategy;
     _averageGreyRegionCreationStrategy = averageGreyRegionCreationStrategy;
     _imageMatchProviderFactory         = imageMatchProviderFactory;
     _imageDataSorter = imageDataSorter;
 }