-
-
Save polatengin/c100ac14cf191f2fc2d3ad67af680ca4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows 10 UWP uygulamalarında OCR kullanımı |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private async void Button_Click(object sender, RoutedEventArgs e) | |
{ | |
var ui = new CameraCaptureUI(); | |
var file = await ui.CaptureFileAsync(CameraCaptureUIMode.Photo); | |
var stream = await file.OpenAsync(FileAccessMode.Read); | |
var decoder = await BitmapDecoder.CreateAsync(stream); | |
var bitmap = await decoder.GetSoftwareBitmapAsync(); | |
var engine = OcrEngine.TryCreateFromUserProfileLanguages(); | |
var result = await engine.RecognizeAsync(bitmap); | |
string extracted = result.Text; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Page | |
x:Class="OCROrnek.MainPage" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:local="using:OCROrnek"> | |
<Grid Margin="20"> | |
<Button Content="Tara" Click="Button_Click" /> | |
</Grid> | |
</Page> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment