Skip to content

Commit aa00f4e

Browse files
tswastbshaffer
authored andcommitted
Add region tags to vision landmark sample (GoogleCloudPlatform#252)
1 parent cbfb0df commit aa00f4e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

vision/api/src/snippets/detect_landmark.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,18 @@
1919
// [START landmark_detection]
2020
use Google\Cloud\Vision\VisionClient;
2121

22+
// [START get_vision_service]
2223
// $apiKey = 'YOUR-API-KEY';
2324
// $path = 'path/to/your/image.jpg'
2425

2526
$vision = new VisionClient([
2627
'key' => $apiKey,
2728
]);
29+
// [END get_vision_service]
30+
// [START construct_request]
2831
$image = $vision->image(file_get_contents($path), ['LANDMARK_DETECTION']);
2932
$result = $vision->annotate($image);
33+
// [END construct_request]
3034
if (!isset($result->info()['landmarkAnnotations'])) {
3135
return;
3236
}

0 commit comments

Comments
 (0)