#AZURE Hello Face: Frame in each detected face in Windows 8.1 App (5)

Hello!

New post for Azure Machine Learning Face APIs series

  1. Face APIs in Azure
  2. Hello Face: Face APIs in a Console App
  3. Hello Face: Face APIs in a WPF App
  4. Hello Face: Face APIs in a Windows 8.1 App
  5. Hello Face: Frame in each detected face in Windows 8.1 App

To complete yesterday-s post; I was missing a small modification to display a Frame in every detected face in the Windows 8.1 app. In the original example of WPF this stored it in a property of type Int32Rect. You cannot use this type in Windows Universal Apps, so I have created 4 new properties to store this value.

Once added these classes, this was a bit of trigonometry to adjust the value of each detected face. The source code is fairly simple

And then in a Canvas, we created a series of Rectangles with the new values

The final app will Display a new Frame in each detected face

All the source code is in GitHub, here https://github.com/elbruno/ProjectOxford

Saludos @ Madrid

/El Bruno

Resources:

– MSDN System.Windows.Int32Rect

12 comments

Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: