Raspberry Pi Watson Visual Recognition

On a raspberry Pi click a button to take a picture using the Pi Camera, send to IBM Watson for analysis, Return JSON of the identified characteristics of the photo.

[{"id":"17aa9202.e69dfe","type":"inject","z":"14e0752f.8673ab","name":"Manual Send Picture","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"x":246,"y":307,"wires":[["945e675f.6ba198"]]},{"id":"945e675f.6ba198","type":"file in","z":"14e0752f.8673ab","name":"get file","filename":"/home/pi/Pictures/image.jpg","format":"","x":493,"y":317,"wires":[["1d634b4.057d3b5"]]},{"id":"f0e6a109.0f196","type":"camerapi-takephoto","z":"14e0752f.8673ab","filemode":"1","filename":"image.jpg","filedefpath":"0","filepath":"/home/pi/Pictures/","fileformat":"jpeg","resolution":"2","fliph":"0","flipv":"1","name":"","x":439,"y":128,"wires":[["97a36981.5ea748"]]},{"id":"1b779e9a.e48861","type":"inject","z":"14e0752f.8673ab","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"x":195,"y":127,"wires":[["f0e6a109.0f196"]]},{"id":"88966b1b.19bd88","type":"exec","z":"14e0752f.8673ab","command":"raspistill -o /home/pi/Pictures/image.jpg -q 5 --vflip","addpay":false,"append":"","useSpawn":true,"timer":"","name":"","x":514,"y":194.5,"wires":[["97a36981.5ea748"],[],[]]},{"id":"e6035156.bba7c","type":"inject","z":"14e0752f.8673ab","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"x":194,"y":195,"wires":[["88966b1b.19bd88"]]},{"id":"97a36981.5ea748","type":"debug","z":"14e0752f.8673ab","name":"","active":true,"console":"false","complete":"false","x":888,"y":140,"wires":[]},{"id":"69b8434f.3ec1cc","type":"watch","z":"14e0752f.8673ab","name":"Monitor For New Picture to send","files":"/home/pi/Pictures/image.jpg","x":223,"y":352,"wires":[["945e675f.6ba198"]]},{"id":"1d634b4.057d3b5","type":"visual-recognition-v3","z":"14e0752f.8673ab","name":"Watson Visual Recognition","apikey":"__PWRD__","image-feature":"classifyImage","lang":"en","x":733,"y":318,"wires":[["9a6f5b24.b59f98"]]},{"id":"9a6f5b24.b59f98","type":"debug","z":"14e0752f.8673ab","name":"Debug","active":true,"console":"false","complete":"true","x":968,"y":313,"wires":[]},{"id":"a4d54525.3d6dd8","type":"ui_button","z":"14e0752f.8673ab","name":"","group":"643521c1.10ee3","order":0,"width":0,"height":0,"label":"Take Picture","color":"","icon":"","payload":"true","payloadType":"bool","topic":"","x":182,"y":77,"wires":[["f0e6a109.0f196"]]},{"id":"643521c1.10ee3","type":"ui_group","z":"","name":"Default","tab":"8b0a4ee.01477b","disp":true,"width":"6"},{"id":"8b0a4ee.01477b","type":"ui_tab","z":"","name":"Home","icon":"dashboard"}]

Flow Info

Created 7 years, 5 months ago
Rating: not yet rated

Owner

Actions

Rate:

Node Types

Core
  • debug (x2)
  • exec (x1)
  • file in (x1)
  • inject (x3)
  • watch (x1)
Other
  • camerapi-takephoto (x1)
  • ui_button (x1)
  • ui_group (x1)
  • ui_tab (x1)
  • visual-recognition-v3 (x1)

Tags

  • Watson
  • Picture
  • Visual
  • Recognition
  • Raspberry
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option