Book Image

Learning Microsoft Cognitive Services - Third Edition

By : Leif Larsen
Book Image

Learning Microsoft Cognitive Services - Third Edition

By: Leif Larsen

Overview of this book

Microsoft Cognitive Services is a set of APIs for integrating artificial intelligence in your applications to solve logical business problems. If you’re new to developing applications with AI, Learning Microsoft Cognitive Services will give you a comprehensive introduction to Microsoft’s AI stack and get you up-to-speed in no time. The book introduces you to 24 APIs, including Emotion, Language, Vision, Speech, Knowledge, and Search. Using Visual Studio, you can develop applications with enhanced capabilities for image processing, speech recognition, text processing, and much more. Moving forward, you will work with datasets that enable your applications to process various data in the form of image, video, or text. By the end of the book, you’ll be able to confidently explore Cognitive Services APIs for building intelligent applications that can be deployed for real-world business uses.
Table of Contents (17 chapters)
Learning Microsoft Cognitive Services - Third Edition
Contributors
Acknowledgments
Preface
Index

Knowing your mood using the Face API


The Face API allows you to recognize emotions from faces.

Research has shown that there are some key emotions that can be classified as cross-cultural. These are happiness, sadness, surprise, anger, fear, contempt, disgust, and neutral. All of these are detected by the API, which allows your applications to respond in a more personalized way by knowing the user's mood.

We will learn how to recognize emotions from images so that our smart-house application can know our mood.

Getting images from a web camera

Imagine that there are several cameras around your house. The smart-house application can see what your mood is at any time. By knowing this, it can utilize the mood to better predict your needs.

We are going to add web-camera capabilities to our application. If you do not have a web camera, you can follow along, but load images using the techniques we have already seen.

First we need to add a NuGet package to our smart-house application. Search for OpenCvSharp3...