Retrieve and analyze a picture on Bluemix
Now, you are ready to import the bottom flow from GitHub.
- To get the pictures from the database, double-click the Cloudant node.
- In Bluemix, configure the Cloudant database to read all documents from the pictures database in the boilerplate database. See the Cloudant documentation on IBM Bluemix for more information on database search indexes.
- Create a new database and name it
You should now see the pictures database in Your Databases view:
To use the Watson Visual Recognition node in Node-RED on Bluemix, you need to create the Visual Recognition service from the Bluemix catalog and connect it to your IoT Starter Boilerplate.
- From the Bluemix catalog, select the Visual Recognition service. Under Connect to, change Leave unbound to your service in the list of applications and then click Create.
When the Visual Recognition service opens, you should be ready to use it in the Node-RED flow on the Bluemix. You might need to restage the IoT Starter boilerplate so that you can use this service in your Node-RED flow.
If you have problems, see Problems connecting from Bluemix to the Raspberry Pi device.
- After the Visual Recognition service is running, click Service Credentials and then View Credentials to get the API key. You will need it to enter this key in the visual recognition node in Node-RED on Bluemix.
- Double-click the visual recognition node in the Node-RED flow, enter the API Key, and select any other functionality that you want.
Finally, you can see the results in the flow editor debug pane:
You might want to test the image for readability by the Watson Visual Recognition service and also get it processed through the web interface on the demo page of the IBM Watson service. To see what type of images are being recognized with the best accuracy, use this link: http://visual-recognition-demo.mybluemix.net/.