Beispiel #1
0
        public BitmapComparer(CompareOptions options = null)
        {
            if (options == null)
            {
                options = new CompareOptions();
            }
            Initialize(options);

            BitmapAnalyzer        = BitmapAnalyzerFactory.Create(AnalyzerType, JustNoticeableDifference);
            Labeler               = LabelerFactory.Create(LabelerType, DetectionPadding);
            BoundingBoxIdentifier = BoundingBoxIdentifierFactory.Create(BoundingBoxMode, BoundingBoxPadding);
        }
Beispiel #2
0
        public void FactoryCreatesConnectedComponentLabeler()
        {
            var target = LabelerFactory.Create(LabelerTypes.ConnectedComponentLabeling, 0);

            Assert.IsInstanceOf(typeof(ConnectedComponentLabeler), target);
        }
Beispiel #3
0
        public void FactoryCreatesBasicLabeler()
        {
            var target = LabelerFactory.Create(LabelerTypes.Basic, 0);

            Assert.IsInstanceOf(typeof(BasicLabeler), target);
        }
Beispiel #4
0
 public void FactoryThrowsWithInvalidType()
 {
     LabelerFactory.Create((LabelerTypes)100, 0);
 }
        public void FactoryCreatesConnectedComponentLabeler()
        {
            var target = LabelerFactory.Create(LabelerTypes.ConnectedComponentLabeling, 0);

            target.ShouldBeOfType <ConnectedComponentLabeler>();
        }
        public void FactoryCreatesBasicLabeler()
        {
            var target = LabelerFactory.Create(LabelerTypes.Basic, 0);

            target.ShouldBeOfType <BasicLabeler>();
        }
 public void FactoryThrowsWithInvalidType()
 {
     Should.Throw <ArgumentException>(() => LabelerFactory.Create((LabelerTypes)100, 0));
 }