<dependency>
<groupId>com.ibm.watson.developer_cloud</groupId>
<artifactId>visual-recognition</artifactId>
<version>6.8.0</version>
</dependency>
'com.ibm.watson.developer_cloud:visual-recognition:6.8.0'
Use the Visual Recognition service to recognize the following picture.
VisualRecognition service = new VisualRecognition("2016-05-20");
IamOptions iamOptions = new IamOptions.Builder()
.apiKey("<iam_api_key>")
.build();
service.setIamCredentials(iamOptions);
System.out.println("Classify an image");
ClassifyOptions options = new ClassifyOptions.Builder()
.imagesFile(new File(SINGLE_IMAGE_FILE))
.build();
ClassifiedImages result = service.classify(options).execute();
System.out.println(result);