We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cbfb0df commit aa00f4eCopy full SHA for aa00f4e
vision/api/src/snippets/detect_landmark.php
@@ -19,14 +19,18 @@
19
// [START landmark_detection]
20
use Google\Cloud\Vision\VisionClient;
21
22
+// [START get_vision_service]
23
// $apiKey = 'YOUR-API-KEY';
24
// $path = 'path/to/your/image.jpg'
25
26
$vision = new VisionClient([
27
'key' => $apiKey,
28
]);
29
+// [END get_vision_service]
30
+// [START construct_request]
31
$image = $vision->image(file_get_contents($path), ['LANDMARK_DETECTION']);
32
$result = $vision->annotate($image);
33
+// [END construct_request]
34
if (!isset($result->info()['landmarkAnnotations'])) {
35
return;
36
}
0 commit comments