craftar. CloudRecognition
new craftar.CloudRecognition(options)
CloudRecognition The CloudRecognition module allows to perform visual searches using a craftar.Image or using the FinderMode from a craftar.Capture element. It uses EventEmmiter to publish the results upon recognition (FinderMode) or search completed (search)
Name | Type | Description |
---|---|---|
options |
dictionary |
The options dictionary must contain at least a String for the token with the key 'token' and can contain a 'url' string if you need a proxy server. |
- See:
-
- craftar.Image
- craftar.Capture
- http://git.io/ee
Extends
- EventEmitter
Methods
-
search(craftarImage)
CloudRecognition.js, line 162 -
Perform a visual search using a given craftar.Image. This function trigers a 'results' callback when the search is completed.
Name Type Description craftarImage
com.craftar.Image Image to send to the CRS Service for the search
-
singleShot(capture)
CloudRecognition.js, line 232 -
Perform a visual search using a given capture object. It only perform one request to CraftAR. This function trigers a 'results' event when a search has at least one result.
Name Type Description capture
com.craftar.Capture Capture element to use for the singleShot search
Fires:
-
startFinder(capture, timeInterval, count)
CloudRecognition.js, line 197 -
Perform a visual search using a given capture object. This function trigers a 'results' event when a search has at least one result.
Name Type Description capture
craftar.Capture Capture element to use for the FinderMode search
timeInterval
int Interval for the searches in miliseconds(min 500 ms)
count
int Number of searches before giving up searching (-1 means no limit).
Fires:
-
stopFinder()
CloudRecognition.js, line 218 -
Stop finder mode if previously has started using startFinder method
Events
-
finderFinished
CloudRecognition.js, line 136 -
Fired when a CloudRecognition Finder Mode search has finished
-
results
CloudRecognition.js, line 173 -
Fired when a CloudRecognition search has produced results
Name Type Description error
Object Returns if an error was produced during the search, null otherwise
results
Object Object containing the list of Items found in the search (can be empty)
XMLHttpRequest
Object Object for debug purposes
Comments
0 comments
Article is closed for comments.