public class AlchemyVision extends AlchemyService
ENDPOINT, JSONP, OUTPUT_MODEMESSAGE_CODE, MESSAGE_ERROR, VERSION| Constructor and Description |
|---|
AlchemyVision() |
| Modifier and Type | Method and Description |
|---|---|
ServiceCall<ImageKeywords> |
getImageKeywords(File image,
Boolean forceShowAll,
Boolean knowledgeGraph)
Extracts keywords from an image.
|
ServiceCall<ImageKeywords> |
getImageKeywords(URL url,
Boolean forceShowAll,
Boolean knowledgeGraph)
Extracts keywords from a URL.
|
ServiceCall<ImageLink> |
getImageLink(String html)
Extracts the main image link from a HTML page.
|
ServiceCall<ImageLink> |
getImageLink(URL url)
Extracts main image link from a URL.
|
ServiceCall<ImageSceneText> |
getImageSceneText(File image)
Identifies text in an image.
|
ServiceCall<ImageSceneText> |
getImageSceneText(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(File image,
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(URL url,
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, setEndPoint, setUsernameAndPassword, toStringpublic ServiceCall<ImageSceneText> getImageSceneText(File image)
image - the image fileImageSceneTextpublic ServiceCall<ImageSceneText> getImageSceneText(URL url)
url - the image URLImageSceneTextpublic ServiceCall<ImageKeywords> getImageKeywords(File image, Boolean forceShowAll, Boolean knowledgeGraph)
image - the image fileforceShowAll - Includes lower confidence tagsknowledgeGraph - Include knowledge graph information in the the results.ImageKeywordspublic ServiceCall<ImageKeywords> getImageKeywords(URL url, Boolean forceShowAll, Boolean knowledgeGraph)
url - the image URLforceShowAll - Includes lower confidence tagsknowledgeGraph - Include knowledge graph information in the the results.ImageKeywordspublic ServiceCall<ImageLink> getImageLink(URL url)
url - the image URLImageLinkpublic ServiceCall<ImageLink> getImageLink(String html)
html - the HTMLImageLinkpublic ServiceCall<ImageFaces> recognizeFaces(File image, 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(URL url, 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 celebritiesImageFacesCopyright © 2015–2016. All rights reserved.