Skip to content

Repository files navigation

topic sample
languages
C#
products
azure

Sample Solution that uses the Computer Vision SDK

The projects in this code are quickstarts that show how to use Computer Vision SDK for local and remote images

Contents

File/folder Description
AnalyzeImage Analyzes image on specified visual parameters
DetectObjects Detects objects in an image
BatchReadFile Looks for printed or handwritten text in a file (accepts PDFs too)
OCR Performs OCR on the image
RegionOfInterest Gets area of interest
TagImage Descriptive tags for an image
Describe Image A caption for the image
Recognize Text Uses RecognizeText for printed and handwritten text
Get Thumbnail Gets a recommended thumbnail for an image given a target size
ComputerVision.sln The Visual Studio solution with the above as projects
readme.md This README file.

Prerequisites

Setup

  1. Clone or download this sample repository
  2. Open the solution ComputerVision_SDK.sln in Visual Studio
  3. Download the images from this repo and add the Images folder as content to each project. Alternatively modify the imageFilePath in all projects to reflect the path of an appropriate local image.

Running the samples

  1. Right-click on the relavant project (detectObjects, extractText, etc) and click on 'Set as StartUp Project'
  2. In 'Program.cs' , update the line private const string subscriptionKey = "<your training key here>"; with your subscription key. For example, if your subscription key is 0123456789abcdef0123456789ABCDEF, then the line should look like c# private const string subscriptionKey = "0123456789abcdef0123456789ABCDEF";
  3. Update the endpoint with the region you generated your endpoint for. For example, if you are using the westcentralus endpoint, you should change the line public const string endpoint = "https://westus.api.cognitive.microsoft.com"; to public const string endpoint = "https://westcentralus.api.cognitive.microsoft.com";
  4. (Optional) Change the remote image URL
  5. (Optional) Comment out visual parameters not needed for AnalyzeImage
  6. Hit F5 or build the solution

API documentation and further reading

  • An explanation of the various concepts and visual features in the API can be found here
  • A detailed documentations of the API can be found here

About

This is a Computer Vision tool based off of the Microsoft template.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages