Exemplo n.º 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);
        }
Exemplo n.º 2
0
        public void FactoryCreatesConnectedComponentLabeler()
        {
            var target = LabelerFactory.Create(LabelerTypes.ConnectedComponentLabeling, 0);

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

            Assert.IsInstanceOf(typeof(BasicLabeler), target);
        }
Exemplo n.º 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));
 }