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); }
public void FactoryCreatesConnectedComponentLabeler() { var target = LabelerFactory.Create(LabelerTypes.ConnectedComponentLabeling, 0); Assert.IsInstanceOf(typeof(ConnectedComponentLabeler), target); }
public void FactoryCreatesBasicLabeler() { var target = LabelerFactory.Create(LabelerTypes.Basic, 0); Assert.IsInstanceOf(typeof(BasicLabeler), target); }
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)); }