上QQ阅读APP看书,第一时间看更新
There's more...
The default code that the template provides invokes the Computer Vision API by passing the image that we have uploaded to blob storage. The face locator templates invoke the API call by passing the visualFeatures=Faces parameter, which returns information about the following:
- Age
- Gender
- Coordinates of the faces in the picture
You can learn more about the Computer Vision API at https://docs.microsoft.com/en-in/azure/cognitive-services/computer-vision/home.
Use the Environment.GetEnvironmentVariable("KeyName") function to retrieve the information that's stored in the application settings. In this case, the CallVisionAPI method uses the function to retrieve the key, which is essential for making a request to Microsoft Cognitive Services.
It's a best practice to store all keys and other sensitive information in application settings.
ICollector and IAsyncCollector are used for the bulk insertion of data.