Skip to content

Latest commit

 

History

History
 
 

visual-recognition

Visual Recognition

Installation

Maven
<dependency>
	<groupId>com.ibm.watson.developer_cloud</groupId>
	<artifactId>visual-recognition</artifactId>
	<version>3.5.1</version>
</dependency>
Gradle
'com.ibm.watson.developer_cloud:visual-recognition:3.5.1'

Usage

Use the Visual Recognition service to recognize the following picture.

Car

VisualRecognition service = new VisualRecognition(VisualRecognition.VERSION_DATE_2016_05_20);
service.setApiKey("<api-key>");

System.out.println("Classify an image");
ClassifyImagesOptions options = new ClassifyImagesOptions.Builder()
    .images(new File("src/test/resources/visual_recognition/car.png"))
    .build();
VisualClassification result = service.classify(options).execute();
System.out.println(result);