-
Notifications
You must be signed in to change notification settings - Fork 20
Tutorial
Harsh Agrawal edited this page Sep 21, 2013
·
3 revisions
To start using MCloudCV is easy. You can download MCloudCV by either cloning the repository
git clone https://github.com/batra-mlp-lab/mcloudcv.git
or by downloading it as a zip file from
https://github.com/batra-mlp-lab/mcloudcv/archive/master.zip
You need to make sure you have redis-server installed and running before you can use the matlab APIs.
Please follow this link to install it: http://redis.io/topics/quickstart
Steps to write a simple application using CloudCV APIs.
-
Import the necessary .jar files and setup MATLAB by calling
mcloudcv_dir = '/full/path/to/the/directory/of/mcloudcv' setup(mcloudcv_dir);
-
Create a variable for the path to config.json. More information about config files [here] 2.
config_path = strcat(mcloudcv_dir,'/config.json');
- Create an object of the CloudCV class.
cv = CloudCV()
- Run the init() function to initialize parameters. The constuctor takes the following argument
- path_to_config_file
- 'full/path/to/input/folder'
- 'full/path/to/output/folder'
- 'Functionality Name'. Details Here
The last three arguments can be skipped together, in this case default arguments from the config file will be valid.
cv.init(config_path)
- Start uploading images in the background using:
cv.run()
- The APIs will upload the result in the background. It will wait for results in the background so that your main application thread is not stuck. When the results are available, they will automatically be retrieved from the server and the resultant text file/image file will be downloaded.