Beispiel #1
0
        public RgbAutoCropProcessor(Configuration configuration, IAutoCropSettings settings, Image <Rgb24> source) : base(configuration, settings, source)
        {
            _cropAnalyzer   = new RgbThresholdAnalyzer();
            _weightAnalyzer = new RgbWeightAnalyzer();

            CropAnalysis = _cropAnalyzer.GetAnalysis(source, settings.ColorThreshold, settings.BucketThreshold);

            if (settings.AnalyzeWeights)
            {
                WeightAnalysis = _weightAnalyzer.GetAnalysis(source, CropAnalysis.Background);
            }
        }
 public override ICropAnalysis GetCropAnalysis()
 {
     return(_cropAnalyzer.GetAnalysis(Source, Settings.ColorThreshold, Settings.BucketThreshold));
 }