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

@@ -10,20 +10,40 @@ namespace LindtLeerformPlugin;
public class LeerformRecognitionControl : BaseRecognitionControl
{
private readonly IImageSource _imageSource;
private readonly LeerformPatternRecognitionService _patternService;
private readonly LeerformRecipeStore _recipeStore;
private Mat? _cameraMatrix;
private Mat? _distCoeffs;
public LeerformRecognitionControl(
LeerformRecognitionControlSettings settings,
IImageSource imageSource,
ILoadingService loadingService) : base(settings, loadingService)
ILoadingService loadingService,
LeerformPatternRecognitionService patternService,
LeerformRecipeStore recipeStore) : base(settings, loadingService)
{
_imageSource = imageSource;
_patternService = patternService;
_recipeStore = recipeStore;
}
public override List<RecipeData> GetRecipesData()
{
return [new RecipeData { RecipeName = "Default" }];
var names = _recipeStore.ListRecipeNames();
if (names.Count == 0)
return [new RecipeData { RecipeName = "Default" }];
var recipes = new List<RecipeData>(names.Count);
foreach (var name in names)
{
var recipe = _recipeStore.Load(name);
recipes.Add(new RecipeData
{
RecipeName = name,
Image = recipe != null ? LeerformRecipeStore.DecodeThumbnail(recipe) : null
});
}
return recipes;
}
protected override void Initialize(RecipeData currentRecipe)