@RequiresEnterpriseLicense(allowEval=true) @ReconnectOn(exceptions=com.ibm.watson.developer_cloud.service.exception.ServiceUnavailableException.class) @Connector(name="watson-visual-recognition", friendlyName="Watson Visual Recognition", minMuleVersion="3.6.0") public class WatsonVisualRecognitionConnector extends Object
Constructor and Description |
---|
WatsonVisualRecognitionConnector() |
Modifier and Type | Method and Description |
---|---|
com.ibm.watson.developer_cloud.visual_recognition.v3.model.VisualClassification |
classifyImage(ClassifyImageRequest request)
Upload images or URLs to identify built-in classifiers by default.
|
com.ibm.watson.developer_cloud.visual_recognition.v3.model.VisualClassifier |
createClassifier(ClassifierRequest request)
Train a new multi-faceted classifier on the uploaded image data.
|
void |
deleteClassifier(String classifierId)
Delete a custom classifier with the specified classifier ID.
|
com.ibm.watson.developer_cloud.visual_recognition.v3.model.DetectedFaces |
detectFaces(ImageRequest request)
Analyze faces in images and get data about them, such as estimated age and gender.
|
Config |
getConfig() |
com.ibm.watson.developer_cloud.visual_recognition.v3.model.RecognizedText |
recognizeText(ImageRequest request)
Recognizes text in images.
|
com.ibm.watson.developer_cloud.visual_recognition.v3.model.VisualClassifier |
retrieveClassifierDetails(String classifierId)
Retrieve information about a specific classifier.
|
List<com.ibm.watson.developer_cloud.visual_recognition.v3.model.VisualClassifier> |
retrieveListOfClassifiers()
Retrieve a list of user-created classifiers.
|
void |
setConfig(Config config) |
com.ibm.watson.developer_cloud.visual_recognition.v3.model.VisualClassifier |
updateClassifier(ClassifierRequest request)
Update an existing classifier by adding new classes, or by adding new images to existing classes
API Doc
|
public Config getConfig()
public void setConfig(Config config)
@Processor(friendlyName="Classify an Image") public com.ibm.watson.developer_cloud.visual_recognition.v3.model.VisualClassification classifyImage(@RefOnly @Default(value="#[payload]") ClassifyImageRequest request) throws IOException
request
- Request object that contains the image and the classifier to be use.IOException
- When the connector can't process the image input stream.@Processor(friendlyName="Detect Faces") public com.ibm.watson.developer_cloud.visual_recognition.v3.model.DetectedFaces detectFaces(@RefOnly @Default(value="#[payload]") ImageRequest request) throws IOException
request
- Request object that contains the image to be use.IOException
- When the connector can't process the image input stream.@Processor(friendlyName="Recognize Text") public com.ibm.watson.developer_cloud.visual_recognition.v3.model.RecognizedText recognizeText(@RefOnly @Default(value="#[payload]") ImageRequest request) throws IOException
request
- Request object that contains the image to be use.IOException
- When the connector can't process the image input stream.@Processor(friendlyName="Retrieve the List of Classifiers") public List<com.ibm.watson.developer_cloud.visual_recognition.v3.model.VisualClassifier> retrieveListOfClassifiers()
@Processor(friendlyName="Retrieve Classifier Details") public com.ibm.watson.developer_cloud.visual_recognition.v3.model.VisualClassifier retrieveClassifierDetails(@Default(value="#[payload]") String classifierId)
classifierId
- The ID of the classifier for which you want details.@Processor(friendlyName="Delete a Classifier") public void deleteClassifier(@Default(value="#[payload]") String classifierId)
classifierId
- The ID of the classifier you want to delete.@Processor(friendlyName="Create a Classifier") public com.ibm.watson.developer_cloud.visual_recognition.v3.model.VisualClassifier createClassifier(@RefOnly @Default(value="#[payload]") ClassifierRequest request) throws VisualRecognitionException
request
- Request object that contains the classifier name, the positive examples and the negative examples
to be use during the creation of the classifier.VisualRecognitionException
- When amount of items inside the zip is less than 10.@Processor(friendlyName="Update a Classifier") public com.ibm.watson.developer_cloud.visual_recognition.v3.model.VisualClassifier updateClassifier(@RefOnly @Default(value="#[payload]") ClassifierRequest request) throws VisualRecognitionException
request
- Request object that contains the classifier id, the positive examples and the negative examples to
be use to update the classifier.VisualRecognitionException
- When some of the zip files are emptyCopyright © 2010–2017. All rights reserved.