Label detection – request structure

We are going to make a new request as follows:

Field Value
HTTP method POST
URL https://videointelligence.googleapis.com/v1/videos:annotate?key=API_KEY
Request body
// SNIPP SNIPP
{
"inputContent": "/9j/7QBEUGhvdG9zaG9...base64-encoded-video-content...fXNWzvDEeYxxxzj/Coa6Bax//Z",
"features": ["LABEL_DETECTION"]
}
// SNIPP SNIPP

 

Note that the inputContent property under the image property is the base64 encoded version of the video. In the same videos folder, you should find a file named Label_Detection-2018228-f88xrq785g_Base64.txt. This is the base64 version of the same video. You can use an online service such as https://www.browserling.com/tools/image-to-base64 or https://www.base64-image.de/ for converting your own video to base64 string. And, under features, we are requesting the LABEL_DETECTION feature.

Neither Packt Publishing nor the author are endorsing the previous links. Please use them at your own risk.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.210.91