27 lines
920 B
C#
27 lines
920 B
C#
using System;
|
|
|
|
namespace VisionCommon {
|
|
public class BinarizationParam : ICloneCopy<BinarizationParam> {
|
|
public bool Enabled { get; set; } = false;
|
|
public eForegroundColor ForegroundColor { get; set; } = eForegroundColor.White;
|
|
public int ThresholdLow { get; set; } = 50;
|
|
public int ThresholdHigh { get; set; } = 150;
|
|
|
|
public BinarizationParam Clone() {
|
|
return ((ICloneable)this).Clone() as BinarizationParam;
|
|
}
|
|
|
|
public void CopyTo(BinarizationParam target) {
|
|
target.Enabled = this.Enabled;
|
|
target.ForegroundColor = this.ForegroundColor;
|
|
target.ThresholdHigh = this.ThresholdHigh;
|
|
target.ThresholdLow = this.ThresholdLow;
|
|
}
|
|
|
|
object ICloneable.Clone() {
|
|
var cloneObj = new BinarizationParam();
|
|
CopyTo(cloneObj);
|
|
return cloneObj;
|
|
}
|
|
}
|
|
} |