cell histogram

This commit is contained in:
EugeneTes
2026-04-07 14:52:20 +02:00
parent 371436d0c3
commit 931de47164
17 changed files with 917 additions and 11 deletions

View File

@@ -0,0 +1,13 @@
namespace LindtLeerformPlugin.Models;
public class CellPattern
{
public int Rows { get; set; } = 4;
public int Cols { get; set; } = 5;
public CellShape Shape { get; set; } = CellShape.Round;
public int Padding { get; set; } = 5;
public int RoiX { get; set; }
public int RoiY { get; set; }
public int RoiWidth { get; set; }
public int RoiHeight { get; set; }
}

View File

@@ -0,0 +1,13 @@
using OpenCvSharp;
namespace LindtLeerformPlugin.Models;
public class CellRegion
{
public int Index { get; set; }
public int Row { get; set; }
public int Col { get; set; }
public Rect BoundingBox { get; set; }
public Point Center { get; set; }
public int Radius { get; set; }
}

View File

@@ -0,0 +1,8 @@
namespace LindtLeerformPlugin.Models;
public class CellResult
{
public int Index { get; set; }
public bool IsGood { get; set; }
public double Distance { get; set; }
}

View File

@@ -0,0 +1,7 @@
namespace LindtLeerformPlugin.Models;
public enum CellShape
{
Square,
Round
}

View File

@@ -0,0 +1,11 @@
namespace LindtLeerformPlugin.Models;
public class LeerformRecipe
{
public string RecipeName { get; set; } = string.Empty;
public CellPattern Pattern { get; set; } = new();
public int[] HistogramBins { get; set; } = [5, 5, 5];
public float[] ReferenceHistogram { get; set; } = [];
public double Tolerance { get; set; } = 0.30;
public string ThumbnailBase64 { get; set; } = string.Empty;
}