public class VisualRecognition extends WatsonService
Modifier and Type | Field and Description |
---|---|
static String |
VERSION_DATE_2016_05_20
Version date.
|
defaultHeaders, MESSAGE_CODE, MESSAGE_ERROR, skipAuthentication, VERSION
Constructor and Description |
---|
VisualRecognition(String versionDate)
Instantiates a new Visual Recognition V3 service.
|
VisualRecognition(String versionDate,
String apiKey)
Instantiates a new Visual Recognition V3 service with a given API key.
|
Modifier and Type | Method and Description |
---|---|
ServiceCall<VisualClassification> |
classify(ClassifyImagesOptions options)
Classify.
|
ServiceCall<VisualClassifier> |
createClassifier(ClassifierOptions options)
Train a new classifier on the uploaded image data.
|
ServiceCall<Void> |
deleteClassifier(String classifierId)
Deletes a classifier.
|
ServiceCall<DetectedFaces> |
detectFaces(VisualRecognitionOptions options)
Detect faces.
|
ServiceCall<VisualClassifier> |
getClassifier(String classifierId)
Retrieve information about a specific classifier.
|
ServiceCall<List<VisualClassifier>> |
getClassifiers()
Retrieve the user-trained classifiers.
|
ServiceCall<RecognizedText> |
recognizeText(VisualRecognitionOptions options)
Recognize text.
|
protected void |
setAuthentication(okhttp3.Request.Builder builder)
Sets the authentication.
|
void |
setUsernameAndPassword(String username,
String password)
Deprecated.
|
ServiceCall<VisualClassifier> |
updateClassifier(String classifierId,
ClassifierOptions options)
Update an existing classifier by adding new classes, or by adding new images to existing classes.
|
configureHttpClient, createServiceCall, getApiKey, getEndPoint, getName, getToken, processServiceCall, setApiKey, setDefaultHeaders, setEndPoint, setSkipAuthentication, toString
public static final String VERSION_DATE_2016_05_20
public VisualRecognition(String versionDate)
versionDate
- The version date (yyyy-MM-dd) of the REST API to use. Specifying this value will keep your API
calls from failing when the service introduces breaking changes.public VisualRecognition(String versionDate, String apiKey)
versionDate
- The version date (yyyy-MM-dd) of the REST API to use. Specifying this value will keep your API
calls from failing when the service introduces breaking changes.apiKey
- the api keyprotected void setAuthentication(okhttp3.Request.Builder builder)
WatsonService
setAuthentication
in class WatsonService
builder
- the new authenticationpublic ServiceCall<VisualClassification> classify(ClassifyImagesOptions options)
options
- the classify optionsVisualClassification
public ServiceCall<VisualClassifier> createClassifier(ClassifierOptions options)
options
- The parameters to create a classifierVisualClassifier
ClassifierOptions
,
VisualClassifier
public ServiceCall<VisualClassifier> updateClassifier(String classifierId, ClassifierOptions options)
classifierId
- the classifier idoptions
- The parameters to create a classifierVisualClassifier
ClassifierOptions
,
VisualClassifier
public ServiceCall<Void> deleteClassifier(String classifierId)
classifierId
- the classifier ID to deleteVisualClassifier
public ServiceCall<DetectedFaces> detectFaces(VisualRecognitionOptions options)
options
- the recognize text optionsVisualClassification
public ServiceCall<VisualClassifier> getClassifier(String classifierId)
classifierId
- the classifier IDVisualClassifier
public ServiceCall<List<VisualClassifier>> getClassifiers()
VisualClassifier
public ServiceCall<RecognizedText> recognizeText(VisualRecognitionOptions options)
options
- the recognize text optionsRecognizedText
@Deprecated public void setUsernameAndPassword(String username, String password)
api_key
instead of username and password. WatsonService.setApiKey(String)
setUsernameAndPassword
in class WatsonService
username
- the usernamepassword
- the passwordCopyright © 2015–2016 IBM Watson. All rights reserved.