Skip to content

Latest commit

 

History

History
55 lines (41 loc) · 3.05 KB

File metadata and controls

55 lines (41 loc) · 3.05 KB
services cognitive-services, computer vision
platforms dotnet, c#
author easyj2j

Computer Vision C# SDK quickstart samples

This repository provides the latest sample code for Cognitive Services Computer Vision SDK quickstarts. These samples target the Microsoft.Azure.CognitiveServices.Vision.ComputerVision 3.2.0 client library.

Features

These samples demonstrate how to use the Computer Vision client library for C# to perform the following actions:

  • Analyze an image
  • Extract handwritten or printed text from an image
  • Generate a thumbnail of an image

Two image input methods are demonstrated for each sample:

  • Uploading a local image
  • Specifying the URL of a remote image

Getting Started

Prerequisites

Quickstart

  1. Clone or download the repository.
  2. Navigate to the ComputerVision folder.
  3. Double-click the ComputerVision.sln file to open the solution in Visual Studio.
  4. Install the Computer Vision client library NuGet package.
    1. On the top menu, click Tools, select NuGet Package Manager, then Manage NuGet Packages for Solution.
    2. Click the Browse tab, and in the Search box type "Microsoft.Azure.CognitiveServices.Vision.ComputerVision".
    3. Select Microsoft.Azure.CognitiveServices.Vision.ComputerVision when it displays, then click the checkbox next to your project name, and Install.
  5. Select the project to run by doing one of the following actions:
    • Use the dropdown combobox in the top menu to select the project.
    • Right-click the project and select Set as StartUp Project.
  6. Open the Program.cs file associated with the project.
  7. Replace <Subscription Key> with your valid subscription key.
  8. Change computerVision.Endpoint to the Azure region associated with your subscription keys, if necessary.
  9. For ExtractText, optionally set textRecognitionMode to TextRecognitionMode.Printed.
  10. Optionally, replace <LocalImage> with the path and file name of a local image (will be ignored if not set).
  11. Optionally, set remoteImageUrl to a different image.
  12. Run the program.

Resources