Skip to content

Plugins

Moe edited this page Feb 5, 2017 · 26 revisions

Contributing a Plugin

Plugin must follow these rules for acceptance.

  • Shinobi must be able to run if the plugin is not present.
  • Exceptions will only be made if the plugin is better off as a feature.
  • Required dependencies must have an installation process included
  • Plugin must be a separate process (a daemon)
  • Plugin interfaces with camera.js through socket.io-client.
  • OpenCV plugin can be reviewed as an example.
  • Instructions must be provided for simple installation and usage.
  • Options for plugin must be hidden unless plugin is connected to camera.js.

Using a Plugin

We will use shinobi-opencv.js, a node.js plugin, for the example.

  1. Locate the plugin and install its required dependencies.
  • In this case it is OpenCV 2.4.9 and the npm called opencv.
  • OpenCV 2.4.9 can be installed with install_opencv_2.4.sh
  • sudo npm install opencv as regular user to install the node.js npm for opencv.
  1. Run the plugin after camera.js is running.
  • pm2 start plugins/opencv/shinobi-opencv.js
  1. You should see OpenCV Connected inside the orange Detector box. More options should also have appeared.
Clone this wiki locally