public void Inference(MarkersContext result, InferenceInput <PointerBitmap> input, Rectangle?inputWindow = null) { using var inputMat = input .GetClippedPointerBitmap(ref inputWindow) .WrapAsMat(); if (inputMat == null) { return; } Inference(result, inputMat); }
public void Inference(ZXingCode result, InferenceInput <PointerBitmap> input, Rectangle?inputWindow = null) { var bmp = input.GetClippedPointerBitmap(ref inputWindow); var luminance = _Implementation.CreateLuminanceSource(bmp.AsSpanBitmap(), ref _RecyclableBuffer); var r = _Reader.Decode(luminance); result._Results.Clear(); result._Results.Add(r); result._ResultRect = inputWindow; // we need to store the crop to reinterpret the results as full image. result.CaptureTime = input.CaptureTime; result.CaptureDevice = input.CaptureDeviceName; }