private async void IOCR(object sender, EventArgs e)
{
var images = await FilePicker.Default.PickAsync(new PickOptions
{
PickerTitle = "Pick image",
FileTypes = FilePickerFileType.Images
});
var path = images.FullPath.ToString();
OCRImage.Source = path;
var ocr = new IronTesseract();
using (var input = new OcrInput())
{
input.AddImage(path);
OcrResult result = ocr.Read(input);
string text = result.Text;
outputText.Text = text;
}
}
private async void IOCR(object sender, EventArgs e)
{
var images = await FilePicker.Default.PickAsync(new PickOptions
{
PickerTitle = "Pick image",
FileTypes = FilePickerFileType.Images
});
var path = images.FullPath.ToString();
OCRImage.Source = path;
var ocr = new IronTesseract();
using (var input = new OcrInput())
{
input.AddImage(path);
OcrResult result = ocr.Read(input);
string text = result.Text;
outputText.Text = text;
}
}
Private Async Sub IOCR(ByVal sender As Object, ByVal e As EventArgs)
Dim images = Await FilePicker.Default.PickAsync(New PickOptions With {
.PickerTitle = "Pick image",
.FileTypes = FilePickerFileType.Images
})
Dim path = images.FullPath.ToString()
OCRImage.Source = path
Dim ocr = New IronTesseract()
Using input = New OcrInput()
input.AddImage(path)
Dim result As OcrResult = ocr.Read(input)
Dim text As String = result.Text
outputText.Text = text
End Using
End Sub
var ocr = new IronTesseract();
using (var input = new OcrInput())
{
input.AddImage(path);
OcrResult result = ocr.Read(input);
string text = result.Text;
outputText.Text = text;
}
var ocr = new IronTesseract();
using (var input = new OcrInput())
{
input.AddImage(path);
OcrResult result = ocr.Read(input);
string text = result.Text;
outputText.Text = text;
}
Dim ocr = New IronTesseract()
Using input = New OcrInput()
input.AddImage(path)
Dim result As OcrResult = ocr.Read(input)
Dim text As String = result.Text
outputText.Text = text
End Using