Hello guys, welcome to the 41st session of using Microsoft Word framework Lewis and cognitive services tutorials for beginners. In the last session, we set up the environment for Vision API, and return description and faces. In this session, we will return tags, text and other details. Let's start with tags. Copy this method, change names instead of faces required tags that will hold on no to a state often tagname and confidence. Confidence represents a priority for that day.
Its value can be between zero to one and at the end, return it as History. That is update our dialogue. Add constant for tags for English. added to the list of Chrome dialogue and copy this case, update name of case and variable. Call to a method to retrieve tax. Save all the files and publish it.
Create a new conversation choose tags Select this image of Pisa TV called Pisa food slice the slice toppings. To select this flower, we got to plant the flower color. Now I'm going to retrieve some details from images such as its dominant color category and check image contains adult contents or not. Copy this method and change me. Here we need to add a category, color image state Colors declared dominant background colors, dominant foreground color and check whether it is a black and white image or not. line drawing type property contains a numeric value.
If zero means it's not a line bonding it is line and print its value. Using his adult content, check for adult content. We can also obtain racing school that is created Stuff string that will hold category names. Look through each category and add it to list. display all this value with comma separated and return it as a string. And let us add line break for proper display.
Status update dialog. Table five and four Shoot and start a new conversation. upload this image of flower. unicorn dominant background color is black, foreground color is white and it is not black and white. And it is not like going and added content is categories plant flowers because select the coin This photo is black and white and its line join the categories abstract non photo now I'm going to create OCR to retrieve tags from image, or OCR. I'm using vision service client instead of Computer Vision API.
As this API is still in preview, there is no model classes exist to retrieve text, but may be available when you are watching this video. Let us copy method signature of this method and rename it. For Computer Vision API, we need to pass an endpoint address. Create a client passkey and endpoint URL. By using recognize text or sync, we can return OCR results. Here we need to pass image URL that is create string builder that will hold all the message these teachings contain all the regions which contains text.
Each region has multiple lines. Look through each line within first region. Look through each word in the line and append it to string builder, but also contains boundary box that represents the location of people at the end, append library and return it as a string. That is a big dialog box for these two Save all files from the sheet start a new conversation just like this court we got proper tax. Expect the board couldn't and now select this court We got perfect text for this. Let us see what we have learned in this session.
To return tax we need to pass tax in required features and look through each type that we caught. The type content type name and confidence. Here we use adult category color and image type features. To perform OCR here I have used resume service client and look through each line and both. Thanks for watching this video. If you have any doubts, please feel free to contact me.
Have a nice day.