public override void SetInput(string input) { _lastInput = input; foreach (var box in _boundingBoxes) { if (box.CanHandleAsync(input).Result) { box.SetInput(input); _currentSelectedBox = box; } } }
public static IImageProcessingContext <Rgba32> CreateLayerFromBoundingBox(this IImageProcessingContext <Rgba32> context, BaseBoundingBox boundingBox, string param) { return(context.Apply(img => { using (var layer = new Image <Rgba32>(img.Width, img.Height)) { boundingBox.SetInput(param); layer.Mutate(i => boundingBox.Apply(i)); img.Mutate(i => i.DrawImage(layer, 1.0f, new Point(0, 0))); } })); }