Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
feat: logo recognition update to GA
Browse files Browse the repository at this point in the history
* feat: adds recognition samples

* feat: moves logo detect to GA

* feat: final changes to logo detection
  • Loading branch information
telpirion authored Mar 24, 2020
1 parent 132d56b commit 7f02d63
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ system-test/*key.json
.DS_Store
package-lock.json
__pycache__
*.code-workspace
launch.json
6 changes: 3 additions & 3 deletions samples/detect_logo.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
'use strict';

function main(localFilePath = 'path/to/your/video.mp4') {
// [START video_detect_logo_beta]
// [START video_detect_logo]
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
// const localFilePath = 'path/to/your/video.mp4'

// Imports the Google Cloud client libraries
const Video = require('@google-cloud/video-intelligence').v1p3beta1;
const Video = require('@google-cloud/video-intelligence');
const fs = require('fs');

// Instantiates a client
Expand Down Expand Up @@ -102,7 +102,7 @@ function main(localFilePath = 'path/to/your/video.mp4') {
}

detectLogo();
// [END video_detect_logo_beta]
// [END video_detect_logo]
}

main(...process.argv.slice(2));
11 changes: 7 additions & 4 deletions samples/detect_logo_gcs.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,19 @@
// limitations under the License.

'use strict';

/**
* Recognizes and annotates logos and brand marks in a video.
* @param {string} inputUri video file to annotate
*/
function main(inputUri = 'gs://cloud-samples-data/video/googlework_short.mp4') {
// [START video_detect_logo_gcs_beta]
// [START video_detect_logo_gcs]
/**
* TODO(developer): Uncomment these variables before running the sample.
*/
// const inputUri = 'gs://cloud-samples-data/video/googlework_short.mp4';

// Imports the Google Cloud client libraries
const Video = require('@google-cloud/video-intelligence').v1p3beta1;
const Video = require('@google-cloud/video-intelligence');

// Instantiates a client
const client = new Video.VideoIntelligenceServiceClient();
Expand Down Expand Up @@ -99,7 +102,7 @@ function main(inputUri = 'gs://cloud-samples-data/video/googlework_short.mp4') {
}

detectLogoGcs();
// [END video_detect_logo_gcs_beta]
// [END video_detect_logo_gcs]
}

main(...process.argv.slice(2));

0 comments on commit 7f02d63

Please sign in to comment.