Skip to content

Commit 935b55c

Browse files
committed
Copy initial files over to v1p1beta1 directory
1 parent 8677f76 commit 935b55c

File tree

10 files changed

+1484
-0
lines changed

10 files changed

+1484
-0
lines changed

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@
9191

9292
<module>unittests</module>
9393
<module>video/cloud-client</module>
94+
<module>vision/beta/cloud-client</module>
9495
<module>vision/cloud-client</module>
9596
<module>vision/face-detection</module>
9697
<module>vision/label</module>

vision/beta/cloud-client/README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Image Feature Detection Sample
2+
3+
[Google Cloud Vision API][vision] provides feature detection for images.
4+
This API is part of the larger collection of Cloud Machine Learning APIs.
5+
6+
This sample Java application demonstrates how to access the Cloud Vision API
7+
using the [Google Cloud Client Library for Java][google-cloud-java].
8+
9+
[vision]: https://cloud.google.com/vision/docs/
10+
[google-cloud-java]: https://github.com/GoogleCloudPlatform/google-cloud-java
11+
12+
## Build the sample
13+
14+
Install [Maven](http://maven.apache.org/).
15+
16+
Build your project with:
17+
18+
```
19+
mvn clean compile assembly:single
20+
```
21+
22+
You can then run a given `ClassName` via:
23+
24+
```
25+
mvn exec:java -Dexec.mainClass=com.example.vision.ClassName \
26+
-DpropertyName=propertyValue \
27+
-Dexec.args="arg1 'arg 2' arg3"
28+
```
29+
30+
### Analyze an image
31+
32+
```
33+
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/your-project-credentials.json
34+
```
35+
36+
```
37+
java -cp target/vision-detect-beta-1.0.0-jar-with-dependencies.jar \
38+
com.example.vision.Detect \
39+
logos "./resources/logos.png"
40+
```

vision/beta/cloud-client/pom.xml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
<!--
2+
Copyright 2017 Google Inc.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
-->
16+
<project>
17+
<modelVersion>4.0.0</modelVersion>
18+
<groupId>com.example.vision</groupId>
19+
<artifactId>vision-detect-beta</artifactId>
20+
<packaging>jar</packaging>
21+
22+
<!-- Parent defines config for testing & linting. -->
23+
<parent>
24+
<artifactId>doc-samples</artifactId>
25+
<groupId>com.google.cloud</groupId>
26+
<version>1.0.0</version>
27+
<relativePath>../../..</relativePath>
28+
</parent>
29+
30+
<properties>
31+
<maven.compiler.target>1.8</maven.compiler.target>
32+
<maven.compiler.source>1.8</maven.compiler.source>
33+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
34+
</properties>
35+
36+
<dependencies>
37+
<!-- [START dependencies] -->
38+
<dependency>
39+
<groupId>com.google.cloud</groupId>
40+
<artifactId>google-cloud-vision</artifactId>
41+
<version>1.12.0</version>
42+
</dependency>
43+
<!-- [END dependencies] -->
44+
45+
<dependency>
46+
<groupId>com.google.auth</groupId>
47+
<artifactId>google-auth-library-oauth2-http</artifactId>
48+
<version>0.9.0</version>
49+
</dependency>
50+
<dependency>
51+
<groupId>com.google.guava</groupId>
52+
<artifactId>guava</artifactId>
53+
<version>23.0</version>
54+
</dependency>
55+
<!-- Test dependencies -->
56+
<dependency>
57+
<groupId>junit</groupId>
58+
<artifactId>junit</artifactId>
59+
<version>4.12</version>
60+
<scope>test</scope>
61+
</dependency>
62+
63+
<dependency>
64+
<groupId>com.google.truth</groupId>
65+
<artifactId>truth</artifactId>
66+
<version>0.36</version>
67+
<scope>test</scope>
68+
</dependency>
69+
</dependencies>
70+
<build>
71+
<plugins>
72+
<plugin>
73+
<artifactId>maven-assembly-plugin</artifactId>
74+
<configuration>
75+
<archive>
76+
<manifest>
77+
<mainClass>com.example.vision.Detect</mainClass>
78+
</manifest>
79+
</archive>
80+
<descriptorRefs>
81+
<descriptorRef>jar-with-dependencies</descriptorRef>
82+
</descriptorRefs>
83+
</configuration>
84+
</plugin>
85+
</plugins>
86+
</build>
87+
</project>
91.1 KB
Loading
158 KB
Loading
8.06 KB
Loading
122 KB
Loading
63.4 KB
Loading

0 commit comments

Comments
 (0)