A plugin to provide the ability to do simple text from image OCR using nothing but platform APIs.
MIT License
79
stars
3
forks
source link
await OcrPlugin.Default.RecognizeTextAsync(imageAsBytes); always throw System.NullReferenceException: 'Object reference not set to an instance of an object.' on windows and android I have to specify OcrOptions to work #6
System.NullReferenceException
HResult=0x80004003
Message=Object reference not set to an instance of an object.
Source=Plugin.Maui.OCR
StackTrace:
at Plugin.Maui.OCR.OcrPatternMatcher.ExtractPattern(String input, OcrPatternConfig config)
at Plugin.Maui.OCR.OcrImplementation.ProcessOcrResult(OcrResult ocrResult, OcrOptions options)
at Plugin.Maui.OCR.OcrImplementation.d8.MoveNext()
at Plugin.Maui.OCR.OcrImplementation.d7.MoveNext()
Works fine: return await OcrPlugin.Default.RecognizeTextAsync(imageAsBytes, options);
Exception:
System.NullReferenceException HResult=0x80004003 Message=Object reference not set to an instance of an object. Source=Plugin.Maui.OCR StackTrace: at Plugin.Maui.OCR.OcrPatternMatcher.ExtractPattern(String input, OcrPatternConfig config) at Plugin.Maui.OCR.OcrImplementation.ProcessOcrResult(OcrResult ocrResult, OcrOptions options) at Plugin.Maui.OCR.OcrImplementation.d8.MoveNext()
at Plugin.Maui.OCR.OcrImplementation.d 7.MoveNext()
Works fine: return await OcrPlugin.Default.RecognizeTextAsync(imageAsBytes, options);