Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Azure-Samples/Cognitive-Face-CSharp-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

page_type languages products description urlFragment
sample
csharp
azure
This repository contains the sample discussed in Create a WPF app to detect and frame faces in an image.
Cognitive-Face-CSharp-sample

Detect and frame faces in an image on Windows

Note: This repository has been archived. Please visit aka.ms/FaceSamples to get started with the latest Face SDK samples.

This repository contains the sample discussed in Create a WPF app to detect and frame faces in an image. The sample uses the Windows client library for the Cognitive Services Face service.

Features

This project provides the following features:

  • Detects faces in an image.
  • Draws a rectangle around each face.
  • Displays face attributes in the status bar when the mouse hovers over each face rectangle.

GettingStartCSharpScreenshot

Getting Started

Prerequisites

Quickstart

  1. Clone or download the repository.
  2. Open the FaceTutorialCS folder in the repository.
  3. Double-click the FaceTutorialCS.sln file, which opens in Visual Studio.
  4. Expand MainWindow.xaml, then open MainWindow.xaml.cs.
  5. Replace <SubscriptionKey> with your valid subscription key.
  6. Replace or verify the Azure region (faceEndpoint) associated with your key.
  7. Build the project, which installs the Face service NuGet package.
  8. Run the program.
  9. Browse and select an image containing faces.
  10. Wait a few seconds for the Face service to respond.
  11. Move your mouse over a face rectangle to see a description of that face on the status bar.

For more information, see Getting Started with Face API in C# Tutorial.

Resources