Created
August 31, 2021 09:20
-
-
Save tahaozket/892b871dc3ea171038cc2fa2eeac22c2 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.Hosting; | |
using Microsoft.Extensions.Logging; | |
using Google.Cloud.Vision.V1; | |
namespace helloworld_csharp | |
{ | |
public class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
// dotnet add package Google.Cloud.Vision.V1 --version 2.3.0 | |
// https://www.nuget.org/packages/Google.Cloud.Vision.V1/ | |
// https://cloud.google.com/dotnet/docs/reference/Google.Cloud.Vision.V1/latest | |
ImageAnnotatorClientBuilder builder = new ImageAnnotatorClientBuilder(); | |
builder.Endpoint = "http://10.149.147.136:10001"; | |
Console.WriteLine("END POINT OVERRIDED"); | |
ImageAnnotatorClient client = builder.Build(); | |
// Ornek imaj dosyasi | |
Image image3 = Image.FromUri("https://i.stack.imgur.com/WiDpa.jpg"); | |
IReadOnlyList<EntityAnnotation> textAnnotations = client.DetectText(image3); | |
foreach (EntityAnnotation text in textAnnotations) | |
{ | |
Console.WriteLine($"Description: {text.Description}"); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment