-
Notifications
You must be signed in to change notification settings - Fork 172
Plugins
Moe edited this page Feb 5, 2017
·
26 revisions
- Locate the plugin and install its required dependencies.
- In this case it is
OpenCV 2.4.9
and the npm calledopencv
.
- OpenCV 2.4.9 will be installed with
install_opencv_2.4.sh
. Run the following to make it executable.
chmod +x install_opencv_2.4.sh
- As regular user run the following to install the node.js npm for opencv.
sudo npm install opencv
- Run the plugin from Shinobi directroy after
camera.js
is running.
pm2 start plugins/opencv/shinobi-opencv.js
- You should see
OpenCV Connected
inside the orange Detector box. More options should also have appeared.
- 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 in which case it shouldn't be classified as a plugin.
- Required dependencies must have an installation process included
- Plugin must be a separate process (a daemon)
- Plugin interfaces with
camera.js
throughsocket.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
. - Plugin cannot undermine the overall performance of Shinobi.
- Reviewed, tested, and accepted by peers or a senior developer in the Slack community chat.
- Well mainly because this allows for a plug and play feel.
- Not having to restart the server for a plugin makes sense.
- Fast and reliable data transfer.
- It was previously attempted that we use UDP ports to achieve the same result but found there was quality loss.
- Socket.io is supported by many languages, not just Node.js
- Write your plugin in Python, C++, whatever. As long as it communicates with
camera.js
through socket.io the data exchange remains the same. - Since each plugin is it's own process it can be run on another machine entirely.
- You could have one machine do camera.js functions and another do opencv requests.