check point

This commit is contained in:
meelstorm
2025-07-14 12:03:59 +02:00
commit d3cb790bd9
431 changed files with 44078 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
using Hawkeye.VisionBuilder.Workflow.Datatypes;
using Hawkeye.VisionBuilder.Workflow.Operations.Attributes;
namespace Hawkeye.VisionBuilder.Workflow.Operations.Basic;
[Category("Basic")]
public class CannyOperation:BaseOperation
{
public int Threshold1 { get; set; } = 100;
public int Threshold2 { get; set; } = 200;
protected override void InterpretInternal(Context context)
{
if (!CheckImageExists(context)) return;
context.ActiveImage = new HawkeyeImage()
{
ImageData = context.ActiveImage.ImageData.Canny(Threshold1, Threshold2)
};
Status = $"Canny with Threshold1={Threshold1} and Threshold2={Threshold2}";
Result = true;
}
public override void Save(BinaryWriter bw)
{
base.Save(bw);
bw.Write(Threshold1);
bw.Write(Threshold2);
}
public override void Load(BinaryReader br)
{
base.Load(br);
Threshold1 = br.ReadInt32();
Threshold2 = br.ReadInt32();
}
}