Thanks to visit codestin.com
Credit goes to github.com

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

Commit c38ab68

Browse files
committed
fixes region tags for face detection tutorial
1 parent 7169423 commit c38ab68

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

samples/faceDetection.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
'use strict';
1717

18-
// [START vision_face_detection_client]
18+
// [START vision_face_detection_tutorial_client]
1919
// By default, the client will authenticate using the service account file
2020
// specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable and use
2121
// the project specified by the GCLOUD_PROJECT environment variable. See
@@ -26,12 +26,12 @@ var vision = require('@google-cloud/vision');
2626
var client = new vision.ImageAnnotatorClient();
2727

2828
var fs = require('fs');
29-
// [END vision_face_detection_client]
29+
// [END vision_face_detection_tutorial_client]
3030

3131
/**
3232
* Uses the Vision API to detect faces in the given file.
3333
*/
34-
// [START vision_face_detection_send_request]
34+
// [START vision_face_detection_tutorial_send_request]
3535
function detectFaces(inputFile, callback) {
3636
// Make a call to the Vision API to detect the faces
3737
const request = {image: {source: {filename: inputFile}}};
@@ -48,12 +48,12 @@ function detectFaces(inputFile, callback) {
4848
callback(err);
4949
});
5050
}
51-
// [END vision_face_detection_send_request]
51+
// [END vision_face_detection_tutorial_send_request]
5252

5353
/**
5454
* Draws a polygon around the faces, then saves to outputFile.
5555
*/
56-
// [START vision_face_detection_process_response]
56+
// [START vision_face_detection_tutorial_process_response]
5757
function highlightFaces(inputFile, faces, outputFile, Canvas, callback) {
5858
fs.readFile(inputFile, (err, image) => {
5959
if (err) {
@@ -99,10 +99,10 @@ function highlightFaces(inputFile, faces, outputFile, Canvas, callback) {
9999
pngStream.on('end', callback);
100100
});
101101
}
102-
// [END vision_face_detection_process_response]
102+
// [END vision_face_detection_tutorial_process_response]
103103

104104
// Run the example
105-
// [START vision_face_detection_run_application]
105+
// [START vision_face_detection_tutorial_run_application]
106106
function main(inputFile, outputFile, Canvas, callback) {
107107
outputFile = outputFile || 'out.png';
108108
detectFaces(inputFile, (err, faces) => {
@@ -120,7 +120,7 @@ function main(inputFile, outputFile, Canvas, callback) {
120120
});
121121
});
122122
}
123-
// [END vision_face_detection_run_application]
123+
// [END vision_face_detection_tutorial_run_application]
124124

125125
exports.main = main;
126126

0 commit comments

Comments
 (0)