public final class RecognizePhoto
extends java.lang.Object
Constructor | Description |
---|---|
RecognizePhoto() |
Modifier and Type | Method | Description |
---|---|---|
static java.lang.String |
getCaption(java.lang.String json) |
Return the caption describing the image created by the Microsoft
Cognitive Services API.
|
static java.lang.String |
getFormat(java.lang.String json) |
Get the image file type.
|
static int |
getHeight(java.lang.String json) |
Get the image height.
|
static int |
getWidth(java.lang.String json) |
Get the image width.
|
static boolean |
isACat(java.lang.String json,
double minConfidence) |
Determine whether the image contains a cat.
|
static boolean |
isADog(java.lang.String json,
double minConfidence) |
Determine whether the image contains a dog.
|
static boolean |
isRick(java.lang.String json) |
Check if image contains Rick Astley.
|
public static int getWidth(java.lang.String json)
json
- the JSON string returned by the Microsoft Cognitive Services APIpublic static int getHeight(java.lang.String json)
json
- the JSON string returned by the Microsoft Cognitive Services APIpublic static java.lang.String getFormat(java.lang.String json)
json
- the JSON string returned by the Microsoft Cognitive Services APIpublic static java.lang.String getCaption(java.lang.String json)
json
- the JSON string returned by the Microsoft Cognitive Services APIpublic static boolean isADog(java.lang.String json, double minConfidence)
json
- the JSON string returned by the Microsoft Cognitive Services APIminConfidence
- the minimum confidence required for this determinationpublic static boolean isACat(java.lang.String json, double minConfidence)
json
- the JSON string returned by the Microsoft Cognitive Services APIminConfidence
- the minimum confidence required for this determinationpublic static boolean isRick(java.lang.String json)
json
- the JSON returned by the Microsoft Cognitive Services API