Watson Developer Cloud Unity SDK
1.0.0
The Unity SDK uses the Watson Developer Cloud services, a collection of REST APIs and SDKs that use cognitive computing to solve complex problems.
|
This class wraps the Visual Recognition service. Visual Recognition Service More...
Classes | |
class | ClassifyReq |
The Classify request More... | |
class | DeleteClassifierReq |
class | DetectFacesReq |
The DetectFaces request More... | |
class | GetClassifierReq |
class | GetClassifiersReq |
The GetClassifier request. More... | |
class | RecognizeTextReq |
class | TrainClassifierReq |
The TrainClassifier request. More... | |
Public Member Functions | |
delegate void | OnGetClassifiers (GetClassifiersTopLevelBrief classifiers, string data) |
The callback used by the GetClassifiers() method. More... | |
delegate void | OnGetClassifier (GetClassifiersPerClassifierVerbose classifier, string data) |
Callback used by the GetClassifier() method. More... | |
delegate void | OnDeleteClassifier (bool success, string data) |
This callback is used by the DeleteClassifier() method. More... | |
delegate void | OnTrainClassifier (GetClassifiersPerClassifierVerbose classifier, string data) |
Callback used by the TrainClassifier() method. More... | |
delegate void | OnClassify (ClassifyTopLevelMultiple classify, string data) |
This callback is used by the Classify() method. More... | |
delegate void | OnDetectFaces (FacesTopLevelMultiple faces, string data) |
This callback is used by the DetectFaces() method. More... | |
delegate void | OnRecognizeText (TextRecogTopLevelMultiple text, string data) |
This callback is used by the RecognizeText() method. More... | |
delegate void | OnGetCollections (GetCollections collections, string data) |
This callback is used by the GetCollections() method. More... | |
delegate void | OnCreateCollection (CreateCollection collection, string data) |
This callback is used by the CreateCollection() method. More... | |
delegate void | OnDeleteCollection (bool success, string data) |
This callback is used by the DeleteCollection() method. More... | |
delegate void | OnGetCollection (CreateCollection collection, string data) |
This callback is used y the GetCollection() method. More... | |
delegate void | OnGetCollectionImages (GetCollectionImages images, string data) |
This callback is used by the GetCollectionImages() method. More... | |
delegate void | OnAddCollectionImage (CollectionsConfig config, string data) |
This callback is used by the AddCollectionImage() method. More... | |
delegate void | OnDeleteCollectionImage (bool success, string data) |
This callback is used by the DeleteCollectionImage() method. More... | |
delegate void | OnGetImageDetails (GetCollectionsBrief image, string data) |
This callback is used by the GetImageDetails() method. More... | |
delegate void | OnDeleteImageMetadata (bool success, string data) |
This callback is used by the DeleteImageMetadata() method. More... | |
delegate void | OnGetImageMetadata (object metadata, string data) |
This callback is used by the GetImageMetadata() method. More... | |
delegate void | OnFindSimilar (SimilarImagesConfig similarImages, string data) |
This callback is used by the FindSimilar() method. More... | |
delegate byte[] | LoadFileDelegate (string filename) |
The delegate for loading a file, used by TrainClassifier(). More... | |
VisualRecognition (Credentials credentials) | |
bool | Classify (OnClassify callback, string url, string[] owners=default(string[]), string[] classifierIDs=default(string[]), float threshold=default(float), string acceptLanguage="en", string customData=default(string)) |
Classifies image specified by URL. More... | |
bool | Classify (string imagePath, OnClassify callback, string[] owners=default(string[]), string[] classifierIDs=default(string[]), float threshold=default(float), string acceptLanguage="en", string customData=default(string)) |
Classifies an image from the file system. More... | |
bool | Classify (OnClassify callback, byte[] imageData, string[] owners=default(string[]), string[] classifierIDs=default(string[]), float threshold=default(float), string acceptLanguage="en", string customData=default(string)) |
Classifies an image using byte data. More... | |
bool | DetectFaces (OnDetectFaces callback, string url, string customData=default(string)) |
Detects faces in a given image URL. More... | |
bool | DetectFaces (string imagePath, OnDetectFaces callback, string customData=default(string)) |
Detects faces in a jpg, gif, png or zip file. More... | |
bool | DetectFaces (OnDetectFaces callback, byte[] imageData=default(byte[]), string customData=default(string)) |
Detect faces in an image's byteData. More... | |
bool | RecognizeText (OnRecognizeText callback, string url, string customData=default(string)) |
Recognizes text given an image url. More... | |
bool | RecognizeText (string imagePath, OnRecognizeText callback, string customData=default(string)) |
Recognizes text in a given image. More... | |
bool | RecognizeText (OnRecognizeText callback, byte[] imageData=default(byte[]), string customData=default(string)) |
Recognizes text in image bytedata. More... | |
bool | GetClassifiers (OnGetClassifiers callback, string customData=default(string)) |
Gets a list of all classifiers. More... | |
bool | GetClassifier (OnGetClassifier callback, string classifierId, string customData=default(string)) |
Gets a classifier by classifierId. More... | |
bool | TrainClassifier (OnTrainClassifier callback, string classifierName, Dictionary< string, string > positiveExamples, string negativeExamplesPath=default(string), string mimeType="application/zip", string customData=default(string)) |
Trains a classifier. Training requires a total of at least two zip files: Two positive example zips with at least 10 positive examples each or one zip file of 10 positive examples and a zip file of 10 negative examples. The total size of all files must be below 256mb. Additional training can be done by using UpdateClassifier. More... | |
bool | TrainClassifier (OnTrainClassifier callback, string classifierName, Dictionary< string, byte[]> positiveExamplesData, byte[] negativeExamplesData=null, string mimeType="application/zip", string customData=default(string)) |
Trains a classifier More... | |
bool | UpdateClassifier (OnTrainClassifier callback, string classifierID, string classifierName, Dictionary< string, string > positiveExamples, string negativeExamplesPath=default(string), string mimeType="application/zip", string customData=default(string)) |
Updates a trained classifier. The total size of all files must be below 256mb. More... | |
bool | UpdateClassifier (OnTrainClassifier callback, string classifierID, string classifierName, Dictionary< string, byte[]> positiveExamplesData, byte[] negativeExamplesData=null, string mimeType="application/zip", string customData=default(string)) |
Updates a classifier using byte data. More... | |
bool | DeleteClassifier (OnDeleteClassifier callback, string classifierId, string customData=default(string)) |
Deletes the classifier by classifierID. More... | |
bool | GetCollections (OnGetCollections callback, string customData=default(string)) |
Get all collections. More... | |
bool | CreateCollection (OnCreateCollection callback, string name, string customData=null) |
Create a new collection of images to search. You can create a maximum of 5 collections. More... | |
bool | DeleteCollection (OnDeleteCollection callback, string collectionID, string customData=null) |
Deletes a collection. More... | |
bool | GetCollection (OnGetCollection callback, string collectionID, string customData=default(string)) |
Retrieve information about a specific collection. Only user-created collections can be specified. More... | |
bool | GetCollectionImages (OnGetCollectionImages callback, string collectionID, string customData=default(string)) |
List 100 images in a collection More... | |
bool | AddCollectionImage (OnAddCollectionImage callback, string collectionID, string imagePath, Dictionary< string, string > metadata=null, string customData=null) |
Add an image to a collection via image path on file system and metadata as dictionary. More... | |
bool | AddCollectionImage (OnAddCollectionImage callback, string collectionID, string imagePath, string metadataPath=null, string customData=null) |
Add an image to a collection via image path on file system and metadata path on file system. More... | |
bool | AddCollectionImage (OnAddCollectionImage callback, string collectionID, byte[] imageData, string filename, string metadata=null, string customData=null) |
Add an image to a collection. More... | |
bool | DeleteCollectionImage (OnDeleteCollectionImage callback, string collectionID, string imageID, string customData=null) |
Deletes an image from a collection. More... | |
bool | GetImage (OnGetImageDetails callback, string collectionID, string imageID, string customData=default(string)) |
List an image's details. More... | |
bool | DeleteCollectionImageMetadata (OnDeleteImageMetadata callback, string collectionID, string imageID, string customData=null) |
Deletes an image metadata. More... | |
bool | GetMetadata (OnGetImageMetadata callback, string collectionID, string imageID, string customData=default(string)) |
List image metadata.. More... | |
bool | FindSimilar (OnFindSimilar callback, string collectionID, string imagePath, int limit=10, string customData=null) |
Find Similar Images by image path. More... | |
bool | FindSimilar (OnFindSimilar callback, string collectionID, byte[] imageData, int limit=10, string customData=null) |
Find Similar Images by byte[]. More... | |
string | GetServiceID () |
<exclude> More... | |
Properties | |
LoadFileDelegate | LoadFile [get, set] |
Set this property to overload the internal file loading of this class. More... | |
string | Url [get, set] |
Gets and sets the endpoint URL for the service. More... | |
string | VersionDate [get, set] |
Gets and sets the versionDate of the service. More... | |
Credentials | Credentials [get, set] |
Gets and sets the credentials of the service. Replace the default endpoint if endpoint is defined. More... | |
This class wraps the Visual Recognition service. Visual Recognition Service
|
inline |
|
inline |
Add an image to a collection via image path on file system and metadata as dictionary.
callback | The callback. |
collectionID | The identifier of the collection to add images to. |
imagePath | The path in the filesystem of the image to add. |
metadata | Optional Dictionary key value pairs of metadata associated with the specified image. |
customData | Optional custom data. |
|
inline |
Add an image to a collection via image path on file system and metadata path on file system.
callback | The callback. |
collectionID | The identifier of the collection to add images to. |
imagePath | The path in the filesystem of the image to add. |
metadataPath | Optional path to metadata json associated with the specified image. |
customData | Optional custom data. |
|
inline |
Add an image to a collection.
callback | The callback. |
collectionID | The identifier of the collection to add images to. |
imageData | The byte[] data of the image to add. |
metadata | Optional json metadata associated with the specified image. |
customData | Optional custom data. |
|
inline |
Classifies image specified by URL.
url | URL. |
callback | Callback. |
owners | Owners. |
classifierIDs | Classifier IDs to be classified against. |
threshold | Threshold. |
acceptLanguage | Accept language. |
customData | Custom data. |
|
inline |
Classifies an image from the file system.
callback | Callback. |
imagePath | Image path. |
owners | Owners. |
classifierIDs | Classifier I ds. |
threshold | Threshold. |
acceptLanguage | Accept language. |
customData | Custom data. |
|
inline |
Classifies an image using byte data.
callback | Callback. |
imageData | Byte array of image data. |
owners | Owners. |
classifierIDs | An array of classifier identifiers. |
threshold | Threshold. |
acceptLanguage | Accepted language. |
customData | Custom data. |
|
inline |
Create a new collection of images to search. You can create a maximum of 5 collections.
callback | The callback. |
name | The name of the created collection. |
customData | Optional custom data. |
|
inline |
Deletes the classifier by classifierID.
true
, if classifier was deleted, false
otherwise.classifierId | Classifier identifier. |
callback | Callback. |
|
inline |
Deletes a collection.
callback | The OnDeleteCollection callback. |
collectionID | The collection identifier to delete. |
customData | Optional custom data. |
|
inline |
Deletes an image from a collection.
callback | The OnDeleteCollection callback. |
collectionID | The collection identifier holding the image to delete. |
imageID | The identifier of the image to delete. |
customData | Optional custom data. |
|
inline |
Deletes an image metadata.
callback | The Callback. |
collectionID | The collection identifier holding the image metadata to delete. |
imageID | The identifier of the image metadata to delete. |
customData | Optional custom data. |
|
inline |
Detects faces in a given image URL.
true
, if faces was detected, false
otherwise.url | URL. |
callback | Callback. |
customData | Custom data. |
|
inline |
Detects faces in a jpg, gif, png or zip file.
true
, if faces was detected, false
otherwise.callback | Callback. |
imagePath | Image path. |
customData | Custom data. |
|
inline |
Detect faces in an image's byteData.
callback | Callback. |
imageData | ByteArray of image data. |
customData | Custom data. |
|
inline |
Find Similar Images by image path.
callback | The callback. |
collectionID | The identifier of the collection to add images to. |
imagePath | The path in the filesystem of the image to query. |
limit | The number of similar results you want returned. Default limit is 10 results, you can specify a maximum limit of 100 results. |
customData | Optional custom data. |
|
inline |
Find Similar Images by byte[].
callback | The callback. |
collectionID | The identifier of the collection to add images to. |
imageData | The byte[] data of the image to query. |
limit | The number of similar results you want returned. Default limit is 10 results, you can specify a maximum limit of 100 results. |
customData | Optional custom data. |
|
inline |
Gets a classifier by classifierId.
true
, if classifier was gotten, false
otherwise.classifierId | Classifier identifier. |
callback | Callback. |
|
inline |
Gets a list of all classifiers.
true
, if classifiers was gotten, false
otherwise.callback | Callback. |
customData | CustomData. |
|
inline |
Retrieve information about a specific collection. Only user-created collections can be specified.
callback | The callback. |
collectionID | The requested collection identifier. |
customData | Custom data. |
|
inline |
List 100 images in a collection
callback | The callback. |
collectionID | The requested collection identifier. |
customData | Custom data. |
|
inline |
Get all collections.
callback | The callback. |
customData | Custom data. |
|
inline |
List an image's details.
callback | The callback. |
collectionID | The requested collection identifier. |
customData | Custom data. |
|
inline |
List image metadata..
callback | The callback. |
collectionID | The requested collection identifier. |
imageID | The requested image identifier. |
customData | Custom data. |
|
inline |
<exclude>
Implements IBM.Watson.DeveloperCloud.Services.IWatsonService.
delegate byte [] IBM.Watson.DeveloperCloud.Services.VisualRecognition.v3.VisualRecognition.LoadFileDelegate | ( | string | filename | ) |
The delegate for loading a file, used by TrainClassifier().
filename | The filename to load. |
delegate void IBM.Watson.DeveloperCloud.Services.VisualRecognition.v3.VisualRecognition.OnAddCollectionImage | ( | CollectionsConfig | config, |
string | data | ||
) |
This callback is used by the AddCollectionImage() method.
config | The collection config. |
data | Optional data |
delegate void IBM.Watson.DeveloperCloud.Services.VisualRecognition.v3.VisualRecognition.OnClassify | ( | ClassifyTopLevelMultiple | classify, |
string | data | ||
) |
This callback is used by the Classify() method.
classify | Returned classification. |
data | Optional data |
delegate void IBM.Watson.DeveloperCloud.Services.VisualRecognition.v3.VisualRecognition.OnCreateCollection | ( | CreateCollection | collection, |
string | data | ||
) |
This callback is used by the CreateCollection() method.
collection | The created collection. |
data | Optional data |
delegate void IBM.Watson.DeveloperCloud.Services.VisualRecognition.v3.VisualRecognition.OnDeleteClassifier | ( | bool | success, |
string | data | ||
) |
This callback is used by the DeleteClassifier() method.
success | Success or failure of the delete call. |
data | Optional data |
delegate void IBM.Watson.DeveloperCloud.Services.VisualRecognition.v3.VisualRecognition.OnDeleteCollection | ( | bool | success, |
string | data | ||
) |
This callback is used by the DeleteCollection() method.
success | Success of the delete call. |
data | Optional data |
delegate void IBM.Watson.DeveloperCloud.Services.VisualRecognition.v3.VisualRecognition.OnDeleteCollectionImage | ( | bool | success, |
string | data | ||
) |
This callback is used by the DeleteCollectionImage() method.
success | Success or failure of deleting collection image. |
data | Optional data |
delegate void IBM.Watson.DeveloperCloud.Services.VisualRecognition.v3.VisualRecognition.OnDeleteImageMetadata | ( | bool | success, |
string | data | ||
) |
This callback is used by the DeleteImageMetadata() method.
success | Success of the delete call. |
data | Optional data |
delegate void IBM.Watson.DeveloperCloud.Services.VisualRecognition.v3.VisualRecognition.OnDetectFaces | ( | FacesTopLevelMultiple | faces, |
string | data | ||
) |
This callback is used by the DetectFaces() method.
faces | Faces Detected. |
data | Optional data |
delegate void IBM.Watson.DeveloperCloud.Services.VisualRecognition.v3.VisualRecognition.OnFindSimilar | ( | SimilarImagesConfig | similarImages, |
string | data | ||
) |
This callback is used by the FindSimilar() method.
similarImages | |
data | Optional data |
delegate void IBM.Watson.DeveloperCloud.Services.VisualRecognition.v3.VisualRecognition.OnGetClassifier | ( | GetClassifiersPerClassifierVerbose | classifier, |
string | data | ||
) |
Callback used by the GetClassifier() method.
classifier | The classifier found by ID. |
data | Optional data |
delegate void IBM.Watson.DeveloperCloud.Services.VisualRecognition.v3.VisualRecognition.OnGetClassifiers | ( | GetClassifiersTopLevelBrief | classifiers, |
string | data | ||
) |
The callback used by the GetClassifiers() method.
classifiers | A brief description of classifiers. |
data | Optional data |
delegate void IBM.Watson.DeveloperCloud.Services.VisualRecognition.v3.VisualRecognition.OnGetCollection | ( | CreateCollection | collection, |
string | data | ||
) |
This callback is used y the GetCollection() method.
collection | The collection. |
data | Optional data |
delegate void IBM.Watson.DeveloperCloud.Services.VisualRecognition.v3.VisualRecognition.OnGetCollectionImages | ( | GetCollectionImages | images, |
string | data | ||
) |
This callback is used by the GetCollectionImages() method.
images | Collection images. |
data | Optional data |
delegate void IBM.Watson.DeveloperCloud.Services.VisualRecognition.v3.VisualRecognition.OnGetCollections | ( | GetCollections | collections, |
string | data | ||
) |
This callback is used by the GetCollections() method.
collections | Collections. |
data | Optional data |
delegate void IBM.Watson.DeveloperCloud.Services.VisualRecognition.v3.VisualRecognition.OnGetImageDetails | ( | GetCollectionsBrief | image, |
string | data | ||
) |
This callback is used by the GetImageDetails() method.
image | The image details. |
data | Optional data |
delegate void IBM.Watson.DeveloperCloud.Services.VisualRecognition.v3.VisualRecognition.OnGetImageMetadata | ( | object | metadata, |
string | data | ||
) |
This callback is used by the GetImageMetadata() method.
metadata | |
data | Optional data |
delegate void IBM.Watson.DeveloperCloud.Services.VisualRecognition.v3.VisualRecognition.OnRecognizeText | ( | TextRecogTopLevelMultiple | text, |
string | data | ||
) |
This callback is used by the RecognizeText() method.
text | Text Recognized. |
data | Optional data |
delegate void IBM.Watson.DeveloperCloud.Services.VisualRecognition.v3.VisualRecognition.OnTrainClassifier | ( | GetClassifiersPerClassifierVerbose | classifier, |
string | data | ||
) |
Callback used by the TrainClassifier() method.
classifier | The classifier created. |
data | Optional data |
|
inline |
Recognizes text given an image url.
true
, if text was recognized, false
otherwise.url | URL. |
callback | Callback. |
customData | Custom data. |
|
inline |
Recognizes text in a given image.
true
, if text was recognized, false
otherwise.callback | Callback. |
imagePath | Image path. |
customData | Custom data. |
|
inline |
Recognizes text in image bytedata.
callback | Callback. |
imageData | Image's byte array data. |
customData | Custom data. |
|
inline |
Trains a classifier. Training requires a total of at least two zip files: Two positive example zips with at least 10 positive examples each or one zip file of 10 positive examples and a zip file of 10 negative examples. The total size of all files must be below 256mb. Additional training can be done by using UpdateClassifier.
true
, if classifier was trained, false
otherwise.callback | Callback. |
classifierName | Classifier name. |
positiveExamples | Dictionary of class name and positive example paths. |
negativeExamplesPath | Negative example file path. |
mimeType | Mime type of the positive examples and negative examples data. Use GetMimeType to get Mimetype from filename. |
|
inline |
Trains a classifier
callback | Callback. |
classifierName | Classifier name. |
positiveExamplesData | Dictionary of class name and class training zip or image byte data. |
negativeExamplesData | Negative examples zip or image byte data. |
mimeType | Mime type of the positive examples and negative examples data. |
|
inline |
Updates a trained classifier. The total size of all files must be below 256mb.
true
, if classifier was updated, false
otherwise.callback | Callback. |
classifierID | Classifier identifier. |
classifierName | Classifier name. |
positiveExamples | Dictionary of class name and positive example paths. |
negativeExamplesPath | Negative example file path. |
mimeType | Mimetype of the file. Use GetMimeType to get Mimetype from filename. |
|
inline |
Updates a classifier using byte data.
callback | Callback. |
classifierID | Classifier identifier. |
classifierName | Classifier name. |
positiveExamplesData | Dictionary of class name and class training zip or image byte data. |
negativeExamplesData | Negative examples zip or image byte data. |
mimeType | Mimetype of the file. Use GetMimeType to get Mimetype from filename. |
|
getset |
Gets and sets the credentials of the service. Replace the default endpoint if endpoint is defined.
|
getset |
Set this property to overload the internal file loading of this class.
|
getset |
Gets and sets the endpoint URL for the service.
|
getset |
Gets and sets the versionDate of the service.