Skip to content

Commit fd089b9

Browse files
authored
chore(vision): removed unsupported samples (GoogleCloudPlatform#1303)
1 parent f8e0b45 commit fd089b9

File tree

5 files changed

+0
-153
lines changed

5 files changed

+0
-153
lines changed

vision/composer.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
"src/detect_safe_search_gcs.php",
2626
"src/detect_image_property.php",
2727
"src/detect_image_property_gcs.php",
28-
"src/detect_crop_hints.php",
29-
"src/detect_crop_hints_gcs.php",
3028
"src/detect_document_text.php",
3129
"src/detect_document_text_gcs.php",
3230
"src/detect_web.php",

vision/src/detect_crop_hints.php

Lines changed: 0 additions & 53 deletions
This file was deleted.

vision/src/detect_crop_hints_gcs.php

Lines changed: 0 additions & 52 deletions
This file was deleted.

vision/test/visionTest.php

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -245,29 +245,6 @@ public function testImagePropertyCommandGcs()
245245
}
246246

247247
# tests for Vision 1.1 features
248-
public function testCropHintsCommand()
249-
{
250-
$path = __DIR__ . '/data/wakeupcat.jpg';
251-
$output = $this->runCommand('crop-hints', ['path' => $path]);
252-
$this->assertStringContainsString('Crop hints:', $output);
253-
$this->assertStringContainsString('(210,0)', $output);
254-
$this->assertStringContainsString('(476,0)', $output);
255-
$this->assertStringContainsString('(476,475)', $output);
256-
$this->assertStringContainsString('(210,475)', $output);
257-
}
258-
259-
public function testCropHintsCommandGcs()
260-
{
261-
$bucketName = $this->requireEnv('GOOGLE_STORAGE_BUCKET');
262-
263-
$path = 'gs://' . $bucketName . '/vision/wakeupcat.jpg';
264-
$output = $this->runCommand('crop-hints', ['path' => $path]);
265-
$this->assertStringContainsString('Crop hints:', $output);
266-
$this->assertStringContainsString('(210,0)', $output);
267-
$this->assertStringContainsString('(476,0)', $output);
268-
$this->assertStringContainsString('(476,475)', $output);
269-
$this->assertStringContainsString('(210,475)', $output);
270-
}
271248

272249
public function testDocumentTextCommand()
273250
{

vision/vision.php

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -193,29 +193,6 @@
193193
})
194194
);
195195

196-
// detect crop hints command
197-
$application->add((new Command('crop-hints'))
198-
->setDefinition($inputDefinition)
199-
->setDescription('Detect crop hints in an image using '
200-
. 'Google Cloud Vision API')
201-
->setHelp(<<
202-
The %command.name% command prints crop hints for an image using
203-
the Google Cloud Vision API.
204-
205-
php %command.full_name% path/to/image.png
206-
207-
EOF
208-
)
209-
->setCode(function ($input, $output) {
210-
$path = $input->getArgument('path');
211-
if (preg_match('/^gs:\/\/([a-z0-9\._\-]+)\/(\S+)$/', $path)) {
212-
detect_crop_hints_gcs($path);
213-
} else {
214-
detect_crop_hints($path);
215-
}
216-
})
217-
);
218-
219196
// detect document text command
220197
$application->add((new Command('document-text'))
221198
->setDefinition($inputDefinition)

0 commit comments

Comments
 (0)