public class AlchemyVision extends AlchemyService
ENDPOINT, JSONP, OUTPUT_MODEdefaultHeaders, MESSAGE_CODE, MESSAGE_ERROR, skipAuthentication, VERSION| Constructor and Description |
|---|
AlchemyVision()
Instantiates a new alchemy data news service.
|
AlchemyVision(java.lang.String apiKey)
Instantiates a new alchemy vision service by apiKey.
|
| Modifier and Type | Method and Description |
|---|---|
ServiceCall<ImageKeywords> |
getImageKeywords(java.io.File image,
java.lang.Boolean forceShowAll,
java.lang.Boolean knowledgeGraph)
Extracts keywords from an image.
|
ServiceCall<ImageKeywords> |
getImageKeywords(java.net.URL url,
java.lang.Boolean forceShowAll,
java.lang.Boolean knowledgeGraph)
Extracts keywords from a URL.
|
ServiceCall<ImageLink> |
getImageLink(java.lang.String html)
Extracts the main image link from a HTML page.
|
ServiceCall<ImageLink> |
getImageLink(java.net.URL url)
Extracts main image link from a URL.
|
ServiceCall<ImageSceneText> |
getImageSceneText(java.io.File image)
Identifies text in an image.
|
ServiceCall<ImageSceneText> |
getImageSceneText(java.net.URL url)
Identifies text in an image specified by URL or in the primary image in a web page specified by URL.
|
ServiceCall<ImageFaces> |
recognizeFaces(java.io.File image,
java.lang.Boolean knowledgeGraph)
Recognizes faces from an image.
For each face detected returns: Bounding box Gender Approximate age Name (if celebrity is detected) Here is an example of how to recognize faces in an image: |
ServiceCall<ImageFaces> |
recognizeFaces(java.net.URL url,
java.lang.Boolean knowledgeGraph)
Recognizes faces from a URL.
For each face detected returns: Bounding box Gender Approximate age Name (if celebrity is detected) Here is an example of how to recognize faces in an image: |
getInputFormat, processServiceCall, setAuthenticationconfigureHttpClient, createServiceCall, getApiKey, getEndPoint, getName, getToken, setApiKey, setDefaultHeaders, setDefaultHeaders, setEndPoint, setSkipAuthentication, setUsernameAndPassword, toStringpublic AlchemyVision()
public AlchemyVision(java.lang.String apiKey)
apiKey - the api keypublic ServiceCall<ImageSceneText> getImageSceneText(java.io.File image)
image - the image fileImageSceneTextpublic ServiceCall<ImageSceneText> getImageSceneText(java.net.URL url)
url - the image URLImageSceneTextpublic ServiceCall<ImageKeywords> getImageKeywords(java.io.File image, java.lang.Boolean forceShowAll, java.lang.Boolean knowledgeGraph)
image - the image fileforceShowAll - Includes lower confidence tagsknowledgeGraph - Include knowledge graph information in the the results.ImageKeywordspublic ServiceCall<ImageKeywords> getImageKeywords(java.net.URL url, java.lang.Boolean forceShowAll, java.lang.Boolean knowledgeGraph)
url - the image URLforceShowAll - Includes lower confidence tagsknowledgeGraph - Include knowledge graph information in the the results.ImageKeywordspublic ServiceCall<ImageLink> getImageLink(java.net.URL url)
url - the image URLImageLinkpublic ServiceCall<ImageLink> getImageLink(java.lang.String html)
html - the HTMLImageLinkpublic ServiceCall<ImageFaces> recognizeFaces(java.io.File image, java.lang.Boolean knowledgeGraph)
AlchemyVision service = new AlchemyVision();
service.setApiKey("<api_key>");
File image = new File("obama.jpg");
ImageFaces faces = service.recognizeFaces(image, true).execute();
System.out.println(faces);
image - the imageknowledgeGraph - provide extra metadata for detected celebritiesImageFacespublic ServiceCall<ImageFaces> recognizeFaces(java.net.URL url, java.lang.Boolean knowledgeGraph)
AlchemyVision service = new AlchemyVision();
service.setApiKey("<api_key>");
URL image = new URL("http://foo.com/the-image.png");
ImageFaces faces = service.recognizeFaces(image, true).execute();
System.out.println(faces);
url - the image URLknowledgeGraph - provide extra metadata for detected celebritiesImageFaces