Skip to content

Latest commit

 

History

History
 
 

api

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

.NET Cloud Vision Samples

A collection of samples that demonstrate how to call the Google Cloud Vision API from C#.

This sample requires .NET Core 2.0 or later. That means using Visual Studio 2017, or the command line. Visual Studio 2015 users can use this older sample.

Build and Run

  1. Follow the set-up instructions in the documentation.

  2. Enable APIs for your project. Click here to visit Cloud Platform Console and enable the Google Cloud Vision API.

  3. From a Powershell command line, run the QuickStart sample:

    PS C:\...\dotnet-docs-samples\vision\api\QuickStart> dotnet run
    cat
    mammal
    whiskers
    small to medium sized cats
    cat like mammal
    
  4. And run the Detect sample to detect various features in images:

    PS C:\...\dotnet-docs-samples\vision\api\Detect> dotnet run
    Detect 1.0.0.0
    Copyright c Google Inc 2017
    
    ERROR(S):
      No verb selected.
    
      labels         Detect labels.
    
      safe-search    Detect safe-search.
    
      properties     Detect properties.
    
      faces          Detect faces.
    
      text           Detect text.
    
      logos          Detect logos.
    
      landmarks      Detect landmarks.
    
      crop-hint      Detect crop hint in a local image file.
    
      web            Find web pages with matching images.
    
      doc-text       Detect text in a document image.
    
      help           Display more information on a specific command.
    
      version        Display version information.
    
    PS C:\...\dotnet-docs-samples\vision\api\Detect> dotnet run text ..\VisionTest\data\bonito.gif
    Bonito: dried and
    fermented for months, but
    still ively on your plate.
    
    Bonito:
    dried
    and
    fermented
    for
    months,
    but
    still
    ively
    on
    your
    plate.
    

Contributing changes

Licensing

Testing