responses = response.getResponsesList();
+ client.close();
+
+ for (AnnotateImageResponse res : responses) {
+ if (res.hasError()) {
+ out.printf("Error: %s\n", res.getError().getMessage());
+ return;
+ }
+ // For full list of available annotations, see http://g.co/cloud/vision/docs
+ TextAnnotation annotation = res.getFullTextAnnotation();
+ for (Page page: annotation.getPagesList()) {
+ String pageText = "";
+ for (Block block : page.getBlocksList()) {
+ String blockText = "";
+ for (Paragraph para : block.getParagraphsList()) {
+ String paraText = "";
+ for (Word word: para.getWordsList()) {
+ String wordText = "";
+ for (Symbol symbol: word.getSymbolsList()) {
+ wordText = wordText + symbol.getText();
+ out.format("Symbol text: %s (confidence: %f)\n", symbol.getText(),
+ symbol.getConfidence());
+ }
+ out.format("Word text: %s (confidence: %f)\n\n", wordText, word.getConfidence());
+ paraText = String.format("%s %s", paraText, wordText);
+ }
+ // Output Example using Paragraph:
+ out.println("\nParagraph: \n" + paraText);
+ out.format("Paragraph Confidence: %f\n", para.getConfidence());
+ blockText = blockText + paraText;
+ }
+ pageText = pageText + blockText;
+ }
+ }
+ out.println("\nComplete annotation:");
+ out.println(annotation.getText());
+ }
+ }
+ }
+ // [END vision_detect_document_uri]
+}
diff --git a/vision/beta/cloud-client/src/test/java/com/example/vision/DetectIT.java b/vision/beta/cloud-client/src/test/java/com/example/vision/DetectIT.java
new file mode 100644
index 00000000000..d0833c58a86
--- /dev/null
+++ b/vision/beta/cloud-client/src/test/java/com/example/vision/DetectIT.java
@@ -0,0 +1,350 @@
+/*
+ Copyright 2017, Google, Inc.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+package com.example.vision;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+/** Tests for vision "Detect" sample. */
+@RunWith(JUnit4.class)
+@SuppressWarnings("checkstyle:abbreviationaswordinname")
+public class DetectIT {
+ private ByteArrayOutputStream bout;
+ private PrintStream out;
+ private Detect app;
+ private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT");
+ private static final String BUCKET = PROJECT_ID;
+
+ @Before
+ public void setUp() throws IOException {
+ bout = new ByteArrayOutputStream();
+ out = new PrintStream(bout);
+ System.setOut(out);
+ app = new Detect();
+ }
+
+ @After
+ public void tearDown() {
+ System.setOut(null);
+ }
+
+ @Test
+ public void testFaces() throws Exception {
+ // Act
+ String[] args = {"faces", "./resources/face_no_surprise.jpg"};
+ Detect.argsHelper(args, out);
+
+ // Assert
+ String got = bout.toString();
+ assertThat(got).contains("anger: POSSIBLE");
+ assertThat(got).contains("joy: POSSIBLE");
+ assertThat(got).contains("surprise: LIKELY");
+ }
+
+ @Test
+ public void testFacesGcs() throws Exception {
+ // Act
+ String[] args = {"faces", "gs://" + BUCKET + "/vision/face_no_surprise.jpg"};
+ Detect.argsHelper(args, out);
+
+ // Assert
+ String got = bout.toString();
+ assertThat(got).contains("anger: POSSIBLE");
+ assertThat(got).contains("joy: POSSIBLE");
+ assertThat(got).contains("surprise: LIKELY");
+ }
+
+ @Test
+ public void testLabels() throws Exception {
+ // Act
+ String[] args = {"labels", "./resources/wakeupcat.jpg"};
+ Detect.argsHelper(args, out);
+
+ // Assert
+ String got = bout.toString();
+ assertThat(got).contains("whiskers");
+ }
+
+ @Test
+ public void testLabelsGcs() throws Exception {
+ // Act
+ String[] args = {"labels", "gs://" + BUCKET + "/vision/wakeupcat.jpg"};
+ Detect.argsHelper(args, out);
+
+ // Assert
+ String got = bout.toString();
+ assertThat(got).contains("whiskers");
+ }
+
+ @Test
+ public void testLandmarks() throws Exception {
+ // Act
+ String[] args = {"landmarks", "./resources/landmark.jpg"};
+ Detect.argsHelper(args, out);
+
+ // Assert
+ String got = bout.toString();
+ assertThat(got).contains("Palace of Fine Arts");
+ }
+
+ @Test
+ public void testLandmarksGcs() throws Exception {
+ // Act
+ String[] args = {"landmarks", "gs://" + BUCKET + "/vision/landmark.jpg"};
+ Detect.argsHelper(args, out);
+
+ // Assert
+ String got = bout.toString();
+ assertThat(got).contains("Palace of Fine Arts");
+ }
+
+ @Test
+ public void testLandmarksUrl() throws Exception {
+ // Act
+ String uri = "https://storage-download.googleapis.com/"
+ + BUCKET + "/vision/landmark.jpg";
+ String[] args = {"landmarks", uri};
+ Detect.argsHelper(args, out);
+
+ // Assert
+ String got = bout.toString();
+ assertThat(got).contains("Palace of Fine Arts");
+ }
+
+ @Test
+ public void testLogos() throws Exception {
+ // Act
+ String[] args = {"logos", "./resources/logos.png"};
+ Detect.argsHelper(args, out);
+
+ // Assert
+ String got = bout.toString();
+ assertThat(got).contains("Google");
+ }
+
+ @Test
+ public void testLogosGcs() throws Exception {
+ // Act
+ String[] args = {"logos", "gs://" + BUCKET + "/vision/logos.png"};
+ Detect.argsHelper(args, out);
+
+ // Assert
+ String got = bout.toString();
+ assertThat(got).contains("Google");
+ }
+
+ @Test
+ public void testText() throws Exception {
+ // Act
+ String[] args = {"text", "./resources/text.jpg"};
+ Detect.argsHelper(args, out);
+
+ // Assert
+ String got = bout.toString();
+ assertThat(got).contains("37%");
+ }
+
+ @Test
+ public void testTextGcs() throws Exception {
+ // Act
+ String[] args = {"text", "gs://" + BUCKET + "/vision/text.jpg"};
+ Detect.argsHelper(args, out);
+
+ // Assert
+ String got = bout.toString();
+ assertThat(got).contains("37%");
+ }
+
+ @Test
+ public void testSafeSearch() throws Exception {
+ // Act
+ String[] args = {"safe-search", "./resources/wakeupcat.jpg"};
+ Detect.argsHelper(args, out);
+
+ // Assert
+ String got = bout.toString();
+ assertThat(got).contains("adult: VERY_UNLIKELY");
+ assertThat(got).contains("racy: UNLIKELY");
+ }
+
+ @Test
+ public void testSafeSearchGcs() throws Exception {
+ // Act
+ String[] args = {"safe-search", "gs://" + BUCKET + "/vision/wakeupcat.jpg"};
+ Detect.argsHelper(args, out);
+
+ // Assert
+ String got = bout.toString();
+ assertThat(got).contains("adult: VERY_UNLIKELY");
+ assertThat(got).contains("racy: UNLIKELY");
+ }
+
+ @Test
+ public void testProperties() throws Exception {
+ // Act
+ String[] args = {"properties", "./resources/landmark.jpg"};
+ Detect.argsHelper(args, out);
+
+ // Assert
+ String got = bout.toString();
+ assertThat(got).contains("fraction:");
+ assertThat(got).contains("r:");
+ assertThat(got).contains("g:");
+ assertThat(got).contains("b:");
+ }
+
+ @Test
+ public void testPropertiesGcs() throws Exception {
+ // Act
+ String[] args = {"properties", "gs://" + BUCKET + "/vision/landmark.jpg"};
+ Detect.argsHelper(args, out);
+
+ // Assert
+ String got = bout.toString();
+ assertThat(got).contains("fraction:");
+ assertThat(got).contains("r:");
+ assertThat(got).contains("g:");
+ assertThat(got).contains("b:");
+ }
+
+ @Test
+ public void detectWebAnnotations() throws Exception {
+ // Act
+ String[] args = {"web", "./resources/landmark.jpg"};
+ Detect.argsHelper(args, out);
+
+ // Assert
+ String got = bout.toString();
+ assertThat(got).contains("Palace of Fine Arts Theatre");
+ assertThat(got).contains("Best guess label: palace of fine arts");
+ }
+
+ @Test
+ public void detectWebAnnotationsGcs() throws Exception {
+ // Act
+ String[] args = {"web", "gs://" + BUCKET + "/vision/landmark.jpg"};
+ Detect.argsHelper(args, out);
+
+ // Assert
+ String got = bout.toString();
+ assertThat(got).contains("Palace of Fine Arts Theatre");
+ assertThat(got).contains("Best guess label: palace of fine arts");
+ }
+
+ @Test
+ public void testDetectWebEntities() throws Exception {
+ // Act
+ String[] args = {"web-entities", "./resources/city.jpg"};
+ Detect.argsHelper(args, out);
+
+ // Assert
+ String got = bout.toString();
+ assertThat(got).doesNotContain("Zepra");
+ }
+
+ @Test
+ public void testDetectWebEntitiesGcs() throws Exception {
+ // Act
+ String[] args = {"web-entities", "gs://" + BUCKET + "/vision/landmark.jpg"};
+ Detect.argsHelper(args, out);
+
+ String got = bout.toString();
+ assertThat(got).contains("Description: Palace of Fine Arts Theatre");
+ }
+
+ @Test
+ public void testDetectWebEntitiesIncludeGeoResults() throws Exception {
+ // Act
+ String[] args = {"web-entities-include-geo", "./resources/city.jpg"};
+ Detect.argsHelper(args, out);
+
+ // Assert
+ String got = bout.toString();
+ assertThat(got).contains("Zepra");
+ }
+
+ @Test
+ public void testDetectWebEntitiesIncludeGeoResultsGcs() throws Exception {
+ // Act
+ String[] args = {"web-entities-include-geo", "gs://" + BUCKET + "/vision/landmark.jpg"};
+ Detect.argsHelper(args, out);
+
+ String got = bout.toString();
+ assertThat(got).contains("Description: Palace of Fine Arts Theatre");
+ }
+
+ @Test
+ public void testCropHints() throws Exception {
+ // Act
+ String[] args = {"crop", "./resources/wakeupcat.jpg"};
+ Detect.argsHelper(args, out);
+
+ // Assert
+ String got = bout.toString();
+ assertThat(got).contains("vertices {");
+ assertThat(got).contains("x: 599");
+ assertThat(got).contains("y: 475");
+ }
+
+ @Test
+ public void testCropHintsGcs() throws Exception {
+ // Act
+ String[] args = {"crop", "gs://" + BUCKET + "/vision/wakeupcat.jpg"};
+ Detect.argsHelper(args, out);
+
+ // Assert
+ String got = bout.toString();
+ assertThat(got).contains("vertices {");
+ assertThat(got).contains("x: 599");
+ assertThat(got).contains("y: 475");
+ }
+
+ @Test
+ public void testDocumentText() throws Exception {
+ // Act
+ String[] args = {"fulltext", "./resources/text.jpg"};
+ Detect.argsHelper(args, out);
+
+ // Assert
+ String got = bout.toString();
+ assertThat(got).contains("After preparation is complete, the ");
+ assertThat(got).contains("37%");
+ assertThat(got).contains("Word text: class (confidence:");
+ }
+
+ @Test
+ public void testDocumentTextGcs() throws Exception {
+ // Act
+ String[] args = {"fulltext", "gs://" + BUCKET + "/vision/text.jpg"};
+ Detect.argsHelper(args, out);
+
+ // Assert
+ String got = bout.toString();
+ assertThat(got).contains("After preparation is complete, the ");
+ assertThat(got).contains("37%");
+ assertThat(got).contains("Word text: class (confidence:");
+ }
+}
diff --git a/vision/cloud-client/README.md b/vision/cloud-client/README.md
index 06c8ec1d706..c8cdefa55a2 100644
--- a/vision/cloud-client/README.md
+++ b/vision/cloud-client/README.md
@@ -16,15 +16,13 @@ Install [Maven](http://maven.apache.org/).
Build your project with:
```
-mvn clean compile assembly:single
+mvn clean package
```
You can then run a given `ClassName` via:
```
-mvn exec:java -Dexec.mainClass=com.example.vision.ClassName \
- -DpropertyName=propertyValue \
- -Dexec.args="arg1 'arg 2' arg3"
+mvn exec:java -DClassName -Dexec.args="arg1 'arg 2' arg3"
```
### Analyze an image
@@ -33,8 +31,53 @@ mvn exec:java -Dexec.mainClass=com.example.vision.ClassName \
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/your-project-credentials.json
```
+#### Quickstart
```
-java -cp target/vision-google-cloud-samples-1.0.0-jar-with-dependencies.jar \
- com.example.vision.Detect \
- logos "./resources/logos.png"
+mvn exec:java -DQuickstartSample
```
+
+#### Faces
+```
+mvn exec:java -DDetect -Dexec.args="faces ./resources/face_no_surprise.jpg"
+```
+
+#### Labels
+```
+mvn exec:java -DDetect -Dexec.args="labels ./resources/wakeupcat.jpg"
+```
+
+#### Landmarks
+```
+mvn exec:java -DDetect -Dexec.args="landmarks ./resources/landmark.jpg"
+```
+
+#### Logos
+```
+mvn exec:java -DDetect -Dexec.args="logos ./resources/logos.png"
+```
+
+#### Text
+```
+mvn exec:java -DDetect -Dexec.args="text ./resources/text.jpg"
+```
+
+#### Safe Search
+```
+mvn exec:java -DDetect -Dexec.args="safe-search ./resources/wakeupcat.jpg"
+```
+
+#### Properties
+```
+mvn exec:java -DDetect -Dexec.args="properties ./resources/city.jpg"
+```
+
+#### Web
+```
+mvn exec:java -DDetect -Dexec.args="web ./resources/landmark.jpg"
+```
+
+#### Crop
+```
+mvn exec:java -DDetect -Dexec.args="crop ./resources/landmark.jpg"
+```
+
diff --git a/vision/cloud-client/pom.xml b/vision/cloud-client/pom.xml
index 2d28db353d8..87a8149d0db 100644
--- a/vision/cloud-client/pom.xml
+++ b/vision/cloud-client/pom.xml
@@ -38,20 +38,10 @@
com.google.cloud
google-cloud-vision
- 1.12.0
+ 1.14.0
-
- com.google.auth
- google-auth-library-oauth2-http
- 0.9.0
-
-
- com.google.guava
- guava
- 23.0
-
junit
@@ -67,21 +57,63 @@
test
-
-
-
- maven-assembly-plugin
-
-
-
+
+
+ Detect
+
+
+ Detect
+
+
+
+
+
+ org.codehaus.mojo
+ exec-maven-plugin
+ 1.6.0
+
+
+
+ java
+
+
+
+
com.example.vision.Detect
-
-
-
- jar-with-dependencies
-
-
-
-
-
+ false
+
+
+
+
+
+
+
+ QuickstartSample
+
+
+ QuickstartSample
+
+
+
+
+
+ org.codehaus.mojo
+ exec-maven-plugin
+ 1.6.0
+
+
+
+ java
+
+
+
+
+ com.example.vision.QuickstartSample
+ false
+
+
+
+
+
+
diff --git a/vision/cloud-client/src/main/java/com/example/vision/Detect.java b/vision/cloud-client/src/main/java/com/example/vision/Detect.java
index 9289d09d4f1..e25c6b29353 100644
--- a/vision/cloud-client/src/main/java/com/example/vision/Detect.java
+++ b/vision/cloud-client/src/main/java/com/example/vision/Detect.java
@@ -1,16 +1,19 @@
-/**
- * Copyright 2017, Google, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of the License at
- *
- *
http://www.apache.org/licenses/LICENSE-2.0
- *
- *
Unless required by applicable law or agreed to in writing, software distributed under the
- * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied. See the License for the specific language governing permissions and
- * limitations under the License.
- */
+/*
+ Copyright 2017, Google, Inc.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
package com.example.vision;
import com.google.cloud.vision.v1.AnnotateImageRequest;
@@ -50,7 +53,7 @@
public class Detect {
/**
- * Detects entities,sentiment and syntax in a document using the Natural Language API.
+ * Detects entities,sentiment and syntax in a document using the Vision API.
*
* @throws Exception on errors while closing the client.
* @throws IOException on Input/Output errors.
@@ -69,13 +72,12 @@ public static void argsHelper(String[] args, PrintStream out) throws Exception,
if (args.length < 1) {
out.println("Usage:");
out.printf(
- "\tjava %s \"\" \"\"\n"
+ "\tmvn exec:java -DDetect -Dexec.args=\" \"\n"
+ "Commands:\n"
+ "\tfaces | labels | landmarks | logos | text | safe-search | properties"
+ "| web | crop \n"
+ "Path:\n\tA file path (ex: ./resources/wakeupcat.jpg) or a URI for a Cloud Storage "
- + "resource (gs://...)\n",
- Detect.class.getCanonicalName());
+ + "resource (gs://...)\n");
return;
}
String command = args[0];
@@ -147,14 +149,6 @@ public static void argsHelper(String[] args, PrintStream out) throws Exception,
}
}
- /**
- * Constructs a {@link Detect} which connects to the Cloud Vision API.
- *
- * @param client The Vision API client.
- */
- public Detect() {
- }
-
/**
* Detects faces in the specified local image.
*
@@ -198,9 +192,10 @@ public static void detectFaces(String filePath, PrintStream out) throws Exceptio
}
/**
- * Detects faces in the specified remote image.
+ * Detects faces in the specified remote image on Google Cloud Storage.
*
- * @param gcsPath The path to the remote file to perform face detection on.
+ * @param gcsPath The path to the remote file on Google Cloud Storage to perform face detection
+ * on.
* @param out A {@link PrintStream} to write detected features to.
* @throws Exception on errors while closing the client.
* @throws IOException on Input/Output errors.
@@ -278,9 +273,10 @@ public static void detectLabels(String filePath, PrintStream out) throws Excepti
}
/**
- * Detects labels in the specified remote image.
+ * Detects labels in the specified remote image on Google Cloud Storage.
*
- * @param gcsPath The path to the remote file to perform label detection on.
+ * @param gcsPath The path to the remote file on Google Cloud Storage to perform label detection
+ * on.
* @param out A {@link PrintStream} to write detected features to.
* @throws Exception on errors while closing the client.
* @throws IOException on Input/Output errors.
@@ -356,16 +352,16 @@ public static void detectLandmarks(String filePath, PrintStream out) throws Exce
/**
* Detects landmarks in the specified URI.
*
- * @param url The path to the file to perform landmark detection on.
+ * @param uri The path to the file to perform landmark detection on.
* @param out A {@link PrintStream} to write detected landmarks to.
* @throws Exception on errors while closing the client.
* @throws IOException on Input/Output errors.
*/
- public static void detectLandmarksUrl(String url, PrintStream out) throws Exception,
+ public static void detectLandmarksUrl(String uri, PrintStream out) throws Exception,
IOException {
List requests = new ArrayList<>();
- ImageSource imgSource = ImageSource.newBuilder().setImageUri(url).build();
+ ImageSource imgSource = ImageSource.newBuilder().setImageUri(uri).build();
Image img = Image.newBuilder().setSource(imgSource).build();
Feature feat = Feature.newBuilder().setType(Type.LANDMARK_DETECTION).build();
AnnotateImageRequest request =
@@ -392,9 +388,10 @@ public static void detectLandmarksUrl(String url, PrintStream out) throws Except
}
/**
- * Detects landmarks in the specified remote image.
+ * Detects landmarks in the specified remote image on Google Cloud Storage.
*
- * @param gcsPath The path to the remote file to perform landmark detection on.
+ * @param gcsPath The path to the remote file on Google Cloud Storage to perform landmark
+ * detection on.
* @param out A {@link PrintStream} to write detected landmarks to.
* @throws Exception on errors while closing the client.
* @throws IOException on Input/Output errors.
@@ -467,9 +464,10 @@ public static void detectLogos(String filePath, PrintStream out) throws Exceptio
}
/**
- * Detects logos in the specified remote image.
+ * Detects logos in the specified remote image on Google Cloud Storage.
*
- * @param gcsPath The path to the remote file to perform logo detection on.
+ * @param gcsPath The path to the remote file on Google Cloud Storage to perform logo detection
+ * on.
* @param out A {@link PrintStream} to write detected logos to.
* @throws Exception on errors while closing the client.
* @throws IOException on Input/Output errors.
@@ -542,9 +540,9 @@ public static void detectText(String filePath, PrintStream out) throws Exception
}
/**
- * Detects text in the specified remote image.
+ * Detects text in the specified remote image on Google Cloud Storage.
*
- * @param gcsPath The path to the remote file to detect text in.
+ * @param gcsPath The path to the remote file on Google Cloud Storage to detect text in.
* @param out A {@link PrintStream} to write the detected text to.
* @throws Exception on errors while closing the client.
* @throws IOException on Input/Output errors.
@@ -623,9 +621,10 @@ public static void detectProperties(String filePath, PrintStream out) throws Exc
}
/**
- * Detects image properties such as color frequency from the specified remote image.
+ * Detects image properties such as color frequency from the specified remote image on Google
+ * Cloud Storage.
*
- * @param gcsPath The path to the remote file to detect properties on.
+ * @param gcsPath The path to the remote file on Google Cloud Storage to detect properties on.
* @param out A {@link PrintStream} to write
* @throws Exception on errors while closing the client.
* @throws IOException on Input/Output errors.
@@ -708,9 +707,10 @@ public static void detectSafeSearch(String filePath, PrintStream out) throws Exc
}
/**
- * Detects whether the specified remote image has features you would want to moderate.
+ * Detects whether the specified remote image on Google Cloud Storage has features you would want
+ * to moderate.
*
- * @param gcsPath The path to the remote file to detect safe-search on.
+ * @param gcsPath The path to the remote file on Google Cloud Storage to detect safe-search on.
* @param out A {@link PrintStream} to write the results to.
* @throws Exception on errors while closing the client.
* @throws IOException on Input/Output errors.
@@ -805,9 +805,9 @@ public static void detectWebDetections(String filePath, PrintStream out) throws
}
/**
- * Detects whether the specified remote image has features you would want to moderate.
+ * Detects whether the specified remote image on Google Cloud Storage has features you would want to moderate.
*
- * @param gcsPath The path to the remote file to detect safe-search on.
+ * @param gcsPath The path to the remote file on Google Cloud Storage to detect safe-search on.
* @param out A {@link PrintStream} to write the results to.
* @throws Exception on errors while closing the client.
* @throws IOException on Input/Output errors.
@@ -899,9 +899,9 @@ public static void detectCropHints(String filePath, PrintStream out) throws Exce
}
/**
- * Suggests a region to crop to for a remote file.
+ * Suggests a region to crop to for a remote file on Google Cloud Storage.
*
- * @param gcsPath The path to the remote file to detect safe-search on.
+ * @param gcsPath The path to the remote file on Google Cloud Storage to detect safe-search on.
* @param out A {@link PrintStream} to write the results to.
* @throws Exception on errors while closing the client.
* @throws IOException on Input/Output errors.
@@ -996,9 +996,9 @@ public static void detectDocumentText(String filePath, PrintStream out) throws E
}
/**
- * Performs document text detection on a local image file.
+ * Performs document text detection on a local image file on Google Cloud Storage.
*
- * @param gcsPath The path to the remote file to detect document text on.
+ * @param gcsPath The path to the remote file on Google Cloud Storage to detect document text on.
* @param out A {@link PrintStream} to write the results to.
* @throws Exception on errors while closing the client.
* @throws IOException on Input/Output errors.
diff --git a/vision/cloud-client/src/test/java/com/example/vision/DetectIT.java b/vision/cloud-client/src/test/java/com/example/vision/DetectIT.java
index 44fce53835a..6d4ee5767b3 100644
--- a/vision/cloud-client/src/test/java/com/example/vision/DetectIT.java
+++ b/vision/cloud-client/src/test/java/com/example/vision/DetectIT.java
@@ -1,5 +1,5 @@
/*
- Copyright 2016, Google, Inc.
+ Copyright 2017, Google, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.