mirror of
https://github.com/kerberos-io/documentation.git
synced 2026-08-23 15:18:31 +00:00
new: background subtraction + small corrections
This commit is contained in:
@@ -28,7 +28,7 @@ The machinery is responsible for the processing. It's **an image processing fram
|
||||
|
||||
The web is responsible for the visualization. It's a **GUI** which helps the user to find activity at a specific period, configure the machinery, view a live stream, see system information and much more. It's important to note that the machinery can work without the web, however we don't recommend this.
|
||||
|
||||
The cloud is an extra service, which is available by default but is not required. The main goal of this service is **to view your activity from everywhere** in the world. By [**subscribing to a plan**](https://cloud.kerberos.io), you can **sync your events** to the cloud application; you can sync **multiple instances** with only one subscription.
|
||||
The cloud is an extra service, which is available by default but is not required. The main goal of this service is **to view your activity from everywhere** in the world. By [**subscribing to a plan**](https://cloud.kerberos.io), you can **sync your images** to the cloud application; you can sync **multiple instances** with **only one subscription**.
|
||||
|
||||
To have a more detailed explanation go to the [**machinery**](machinery/introduction) and [**web**](web/introduction) pages.
|
||||
|
||||
@@ -39,7 +39,7 @@ To have a more detailed explanation go to the [**machinery**](machinery/introduc
|
||||
|
||||
Kerberos.io comes with **a bunch of features**, below you can find a short list of the most important ones.
|
||||
|
||||
* Full range camera support (USB-, Raspberry Pi-, and IP-camera (RTSP or MJPEG)).
|
||||
* Full range camera support (USB-, Raspberry Pi (v1.3 and v2.1)-, and IP-camera (RTSP or MJPEG stream)).
|
||||
* Constraints to make detection more intelligent (time interval, regions, etc).
|
||||
* Post-processes which are executed after a valid activity (GPIO pin, webhook, etc).
|
||||
* Live streaming (MJPEG) on the web or with another program like VLC or IP camera viewer.
|
||||
|
||||
@@ -6,10 +6,12 @@ Kerberos.io runs on every machine but its main goal is to run on a **Raspberry P
|
||||
|
||||
### Raspberry Pi
|
||||
|
||||
As said, you can run Kerberos.io **on every machine**, however we recommend to run Kerberos.io on a **Raspberry Pi**, as it is a low-budget microcontroller which can you buy in almost every electronic shop. Besides that Kerberos.io comes with a custom OS called **KIOS** (Kerberos.io Operating System), which you can deploy to your Raspberry Pi in just a few minutes. Kerberos.io supports **all Raspberry Pi versions** (1, 2 and 3).
|
||||
As said, you can run Kerberos.io **on every Linux based machine**, however we recommend to run Kerberos.io on a **Raspberry Pi**, as it is a low-budget microcontroller which can you buy in almost every (online) electronic shop. Therefore Kerberos.io comes with a custom ARM OS called [**KIOS**](installation/KiOS) (Kerberos.io Operating System), which you can deploy to your Raspberry Pi in just a few minutes. Kerberos.io supports **all Raspberry Pi versions** (1, 2, 3 and Zero).
|
||||
|
||||

|
||||
|
||||
For the moment of writing (2016), we do **not support other boards**.
|
||||
|
||||
### SD card
|
||||
|
||||
If you want to use your Raspberry Pi, you will need to have a SD card, on which an OS will be installed. Therefore you will need a **2GB or bigger SD card**.
|
||||
@@ -24,7 +26,7 @@ You will need to have a **micro USB 5V** charger, to give the Raspberry Pi some
|
||||
|
||||
### Camera
|
||||
|
||||
Kerberos.io works with the full range of camera's. You can use an **USB-**, **IP-** or the **Raspberry Pi camera**.
|
||||
Kerberos.io works with the full range of camera's. You can use an **USB-**, **IP-** or the **Raspberry Pi camera (v1.3 and v2.1)**.
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
* Settings page is now visible on mobile (+ changed icon). [#16](https://github.com/kerberos-io/web/issues/16)
|
||||
* Fixed sorting of news articles. [#16](https://github.com/kerberos-io/web/issues/16)
|
||||
* Removed links to assets in the cloud (.css files). [#16](https://github.com/kerberos-io/web/issues/16)
|
||||
* Design: improved layout of login page, async loading of image view.
|
||||
|
||||
#### Machinery
|
||||
|
||||
@@ -36,6 +37,7 @@
|
||||
#### Kios
|
||||
|
||||
* Fix removal images if disk is almost full (wrong path was defined). [#1](https://github.com/kerberos-io/kios/issues/1)
|
||||
* Support for the Raspberry Pi Camera module v2.1. [#3](https://github.com/kerberos-io/kios/issues/3)
|
||||
|
||||
|
||||
<a name="2-0-0"></a>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#First things first
|
||||
|
||||
The reason why you're on this page is because you want to know how to install Kerberos.io on your Raspberry Pi, local working station, server or whatever machine you prefer. The good news is that we have **different approaches** from basic to advanced; it depends on how you want to install it.
|
||||
The reason why you're on this page is because you want to know how to install Kerberos.io on your Raspberry Pi, local working station, server or whatever Linux machine you prefer. The good news is that we have **different approaches** from basic to advanced; it depends on how you want to install it.
|
||||
|
||||
## Raspberry Pi (ARM)
|
||||
|
||||
When deploying on the Raspberry Pi there are two possible solutions. You can use our custom OS, **KiOS** (Kerberos.io Operating System), which is production-ready or install it on an existing OS, **Raspbian**.
|
||||
When deploying on the Raspberry Pi there are two possible solutions. You can use our custom OS, [**KiOS**](installation/KiOS) (Kerberos.io Operating System), which is production-ready or install it on an existing OS, [**Raspbian**](installation/Raspbian).
|
||||
|
||||
###KiOS
|
||||
|
||||
|
||||
@@ -10,107 +10,134 @@
|
||||
|
||||
[KiOS](https://github.com/kerberos-io/kios) (Kerberos.io Operating System) is a custom linux OS created for the Raspberry Pi by buildroot, which runs Kerberos.io out-of-the-box. KiOS is **installed like every other OS** for the Raspberry Pi, you need to flash the OS (.img) to a SD card and update your network configration; no manual compilation or horrible configurations. If you want to get Kerberos.io up and running at a short time frame, this is the **most simple** and **basic** installation procedure; it takes about 15-30 min to download, install and configure.
|
||||
|
||||
To install KiOS you can <b>use our own installer</b>, which gives you a nice GUI that will handle the flashing for you, <b>or you can do the flashing yourself</b>.
|
||||
|
||||
<div id="installer">
|
||||
|
||||
<h2>Installer</h2>
|
||||
By using the KiOS installer, you'll get <b>an easy to use GUI</b> which allows you to configure and flash KiOS to your SD card. Just download the installer, select a version, specify your network configurations, select your SD card and press the flash button; it can't be easier.
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="advanced">
|
||||
<h2>Advanced</h2>
|
||||
|
||||
It's not a problem if you don't want to use the KiOS installer. You can download the KiOS .img yourself and flash it to your SD card.<br/><br/>
|
||||
|
||||
<iframe src="https://player.vimeo.com/video/164054497?autoplay=0&color=943633" style="width:100%; height: 400px;" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
|
||||
|
||||
<a name="download"></a>
|
||||
## 1. Download the .img
|
||||
<h2>1. Download the .img</h2>
|
||||
|
||||
All releases are stored on the KiOS [**Github repository**](https://github.com/kerberos-io/kios), each release contains several images (for every Raspberry Pi version a different image is created). It's important to download the correct image; installing an image for another Raspberry Pi version will not work. After downloading, make sure to unzip the release.
|
||||
All releases are stored on the KiOS <a href="https://github.com/kerberos-io/kios"><b>Github repository</b></a>, each release contains several images (for every Raspberry Pi version a different image is created). It's important to download the correct image; installing an image for another Raspberry Pi version will not work. After downloading, make sure to unzip the release.
|
||||
|
||||
[](https://github.com/kerberos-io/kios/releases)
|
||||
|
||||
<a name="flash"></a>
|
||||
## 2. Flash the .img to a SD card
|
||||
<h2>2. Flash the .img to a SD card</h2>
|
||||
|
||||
Ensure that you have inserted the SD card, that you wish to clone, into the SD card reader. If you dont have an internal SD card reader, you will need to plug in an external SD card reader via a USB socket.
|
||||
|
||||
### OSX
|
||||
<h3>OSX</h3>
|
||||
|
||||
* Download and install [RPi-sd card builder v1.2](https://mega.co.nz/#!PZc2HTTQ!eD9dtFpoKnbZqP1hkvrv43_Pvc9xadMVxRP2K-M8n88).
|
||||
* Run the app.
|
||||
* Select the kios-x-y.img.
|
||||
* Select your SD card.
|
||||
* Insert your password, as the program will need administrator privileges.
|
||||
* The system will start transferring the image to your SD card.
|
||||
* A confirmation is shown that the transferred is completed and SD card unmounted.
|
||||
<ul>
|
||||
<li>Download and install <a href="https://mega.co.nz/#!PZc2HTTQ!eD9dtFpoKnbZqP1hkvrv43_Pvc9xadMVxRP2K-M8n88">RPi-sd card builder v1.2</a>.</li>
|
||||
<li>Run the app.</li>
|
||||
<li>Select the kios-x-y.img.</li>
|
||||
<li>Select your SD card.</li>
|
||||
<li>Insert your password, as the program will need administrator privileges.</li>
|
||||
<li>The system will start transferring the image to your SD card.</li>
|
||||
<li>A confirmation is shown that the transferred is completed and SD card unmounted.</li>
|
||||
</ul>
|
||||
|
||||
### Windows
|
||||
<h3>Windows</h3>
|
||||
|
||||
* Download and install [Win32DiskImager](http://sourceforge.net/projects/win32diskimager/files/latest/download).
|
||||
* Select the KiOS image and the drive letter of the SD card.
|
||||
<ul>
|
||||
<li>Download and install <a href="http://sourceforge.net/projects/win32diskimager/files/latest/download">Win32DiskImager</a>.</li>
|
||||
<li>Select the KiOS image and the drive letter of the SD card.</li>
|
||||
</ul>
|
||||
|
||||
### Linux
|
||||
<h3>Linux</h3>
|
||||
|
||||
#### Format SD card
|
||||
<h4>Format SD card</h4>
|
||||
|
||||
Select SD card and delete all partitions with gparted
|
||||
|
||||
gparted
|
||||
<pre><code>gparted
|
||||
</code></pre>
|
||||
|
||||
To format the SD card, enter the following command:
|
||||
|
||||
sudo mkdosfs -F 16 -v /dev/sdb -I
|
||||
<pre><code>sudo mkdosfs -F 16 -v /dev/sdb -I
|
||||
</code></pre>
|
||||
|
||||
#### Transfer image to your SD card
|
||||
<h4>Transfer image to your SD card</h4>
|
||||
|
||||
In Terminal, enter the following command ensuring that you identify the correct destination disc.
|
||||
|
||||
sudo dd if="kios-x-y.img" of=/dev/sdb bs=2M
|
||||
<pre><code>sudo dd if="kios-x-y.img" of=/dev/sdb bs=2M
|
||||
</code></pre>
|
||||
|
||||
<a name="network"></a>
|
||||
## 3. Network configuration
|
||||
<h2>3. Network configuration</h2>
|
||||
|
||||
After the image has been transferred, you can plug the SD card in to your Raspberry Pi and everything will work magically. By default the KiOS image will require an ethernet connection and use DHCP to give you a dynamic IP-address. However if you want to have a **static IP-address** or/and use a **wireless connection**, you'll need to do a small configuration. Insert the SD card into your working station and open the SD card, you'll see two files **static_ip.conf** and **wireless.conf**.
|
||||
After the image has been transferred, you can plug the SD card in to your Raspberry Pi and everything will work magically. By default the KiOS image will require an ethernet connection and use DHCP to give you a dynamic IP-address. However if you want to have a <b>static IP-address</b> or/and use a <b>wireless connection</b>, you'll need to do a small configuration. Insert the SD card into your working station and open the SD card, you'll see two files <b>static_ip.conf</b> and <b>wireless.conf</b>.
|
||||
|
||||
### Static IP-address
|
||||
<h3>Static IP-address</h3>
|
||||
|
||||
Open and edit the file **static_ip.conf**.
|
||||
Open and edit the file <b>static_ip.conf</b>.
|
||||
|
||||
#####################################################################
|
||||
# Enter the IP-address you want to have, followed by the subnet mask
|
||||
# e.g. 192.168.0.10/24
|
||||
<pre><code>#####################################################################
|
||||
# Enter the IP-address you want to have, followed by the subnet mask
|
||||
# e.g. 192.168.0.10/24
|
||||
|
||||
static_ip=""
|
||||
static_ip=""
|
||||
|
||||
#####################################################################
|
||||
# Enter the Gateway and DNS, this will be your router in most cases
|
||||
# e.g. 192.168.0.1
|
||||
#####################################################################
|
||||
# Enter the Gateway and DNS, this will be your router in most cases
|
||||
# e.g. 192.168.0.1
|
||||
|
||||
static_gw=""
|
||||
static_dns=""
|
||||
|
||||
### Wireless connection
|
||||
static_gw=""
|
||||
static_dns=""
|
||||
</code></pre>
|
||||
|
||||
Open and edit the file **wireless.conf**. Fill-in your WIFI credentials: **SSID** the name of your wireles network, and **PSK** the password of your wireless network.
|
||||
<h3>Wireless connection</h3>
|
||||
|
||||
update_config=1
|
||||
ctrl_interface=/var/run/wpa_supplicant
|
||||
Open and edit the file <b>wireless.conf</b>. Fill-in your WIFI credentials: <b>SSID</b> the name of your wireles network, and <b>PSK</b> the password of your wireless network.
|
||||
|
||||
network={
|
||||
scan_ssid=1
|
||||
ssid=""
|
||||
psk=""
|
||||
}
|
||||
<pre><code>update_config=1
|
||||
ctrl_interface=/var/run/wpa_supplicant
|
||||
|
||||
network={
|
||||
scan_ssid=1
|
||||
ssid=""
|
||||
psk=""
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<a name="poweron"></a>
|
||||
## 4. Power on the Raspberry Pi
|
||||
<h2>4. Power on the Raspberry Pi</h2>
|
||||
|
||||
When the installation is completed, you can **plug the SD card** into your Raspberry Pi. From this point KiOS will boot the kernel and re-partition your SD-card; Please note that the first time you boot KiOS it can take about 2 mins before the system is operational. When KiOS is ready you can **open your favorite browser** and type in the IP address of your Raspberry Pi. This will open the Kerberos.io login page, which you can **access** with the username: **root** and password: **root**.
|
||||
When the installation is completed, you can <b>plug the SD card</b> into your Raspberry Pi. From this point KiOS will boot the kernel and re-partition your SD-card; Please note that the first time you boot KiOS it can take about 2 mins before the system is operational. When KiOS is ready you can <b>open your favorite browser</b> and type in the IP address of your Raspberry Pi. This will open the Kerberos.io login page, which you can <b>access</b> with the username: <b>root</b> and password: <b>root</b>.
|
||||
|
||||

|
||||
|
||||
<a name="access"></a>
|
||||
## 5. Access the Raspberry Pi with SSH
|
||||
<h2>5. Access the Raspberry Pi with SSH</h2>
|
||||
|
||||
To use Kerberos.io you only need access to the webinterface, however you can also **access the system with SSH**.
|
||||
To use Kerberos.io you only need access to the webinterface, however you can also <b>access the system with SSH</b>.
|
||||
|
||||
Cedrics-Mac-mini:build cedricverst$ ssh root@192.168.0.12
|
||||
Welcome to kios-79e30bbb!
|
||||
[root@kios-79e30bbb ~]#
|
||||
<pre><code>Cedrics-Mac-mini:build cedricverst$ ssh root@192.168.0.12
|
||||
Welcome to kios-79e30bbb!
|
||||
[root@kios-79e30bbb ~]#
|
||||
</code></pre>
|
||||
|
||||
Note that by default no root password is set, you can define a password in the **/data/etc/kios.conf** file.
|
||||
Note that by default no root password is set, you can define a password in the <b>/data/etc/kios.conf</b> file.
|
||||
|
||||
<pre><code>[root@kios-79e30bbb ~]# nano /data/etc/kios.conf
|
||||
[root@kios-79e30bbb ~]# reboot
|
||||
</code></pre>
|
||||
|
||||
[root@kios-79e30bbb ~]# nano /data/etc/kios.conf
|
||||
[root@kios-79e30bbb ~]# reboot
|
||||
|
||||
Add your password, save the file and reboot the system.
|
||||
</div>
|
||||
@@ -19,6 +19,4 @@ Kerberos can be used with any IP camera, that provides a streaming URL. Make sur
|
||||
<a name="raspberry-pi-camera"></a>
|
||||
## Raspberry Pi camera
|
||||
|
||||
You can use the Raspberry Pi camera with Kerberos.io, you just need to attach the camera and you are ready to go. The Raspberry Pi Camera Module is enabled by default in the web interface. Please note that if you didn't installed Kerberos with the image, you will need to enable the camera module yourself.
|
||||
|
||||
#Streaming
|
||||
You can use the Raspberry Pi camera (v1.3 and v2.1) with Kerberos.io, you just need to attach the camera and you are ready to go. The Raspberry Pi Camera Module is enabled by default in the web interface. Please note that if you didn't installed Kerberos with the image, you will need to enable the camera module yourself.
|
||||
@@ -11,6 +11,7 @@ The parameters of the USB-camera can be found in the **config/capture.xml** file
|
||||
<USBCamera>
|
||||
<frameWidth type="number">1280</frameWidth>
|
||||
<frameHeight type="number">720</frameHeight>
|
||||
<deviceNumber type="number">0</deviceNumber>
|
||||
<delay type="number">0</delay>
|
||||
<angle type="number">0</angle>
|
||||
</USBCamera>
|
||||
@@ -21,6 +22,10 @@ The parameters of the USB-camera can be found in the **config/capture.xml** file
|
||||
|
||||
You can set the resolution of the capture device, make sure the resolution you've defined is valid with your camera. Please check the specs of the USB camera you're using.
|
||||
|
||||
### Device number
|
||||
|
||||
If more than one device is connected, you can specify the index of the USB-camera. The index is an integer (1-5).
|
||||
|
||||
### Delay
|
||||
|
||||
You can provide a delay/interval (milliseconds) between two captures.
|
||||
|
||||
@@ -16,7 +16,7 @@ A more detailed explanation can be found [here](http://blog.cedric.ws/opencv-sim
|
||||
|
||||
## Parameters
|
||||
|
||||
The parameters of the Differential image algorithm can be found in the *config/algorithm.xml* file, but you can also use the web to modify the parameters. Below you see a default configuration file.
|
||||
The parameters of the Differential images algorithm can be found in the *config/algorithm.xml* file, but you can also use the web to modify the parameters. Below you see a default configuration file.
|
||||
|
||||
<algorithms>
|
||||
|
||||
|
||||
51
72_machinery/81_algorithms/2_background_subtraction.md
Normal file
51
72_machinery/81_algorithms/2_background_subtraction.md
Normal file
@@ -0,0 +1,51 @@
|
||||
# Background subtraction
|
||||
|
||||
This Background subtraction algorithm is **a more advanced** method in comparison to the **Differential images** method. The key difference is that it uses and calculates a background image. Images taken from the capture device are then subtracted from the background image, resulting in a more robust segmentation of the foreground. As this method is more accurate, it also **consumes a lot more CPU power and memory**; the background model is adapted by every iteration.
|
||||
|
||||
# Parameters
|
||||
|
||||
The parameters of the Background images algorithm can be found in the *config/algorithm.xml* file, but you can also use the web to modify the parameters. Below you see a default configuration file.
|
||||
|
||||
<algorithms>
|
||||
|
||||
<BackgroundSubtraction>
|
||||
<shadows type="text">true</shadows>
|
||||
<history type="number">50</history>
|
||||
<nmixtures type="number">5</nmixtures>
|
||||
<ratio type="number">1</ratio>
|
||||
<erode type="number">5</erode>
|
||||
<dilate type="number">7</dilate>
|
||||
<threshold type="number">20</threshold>
|
||||
</BackgroundSubtraction>
|
||||
|
||||
</algorithms>
|
||||
|
||||
### Shadows
|
||||
|
||||
The shadows parameter is a true or false. By using this parameter you can make the Background subtraction a little bit more intelligent; to **neglect shadows in the foreground model**.
|
||||
|
||||
### History
|
||||
|
||||
This is an integer which tells the system, **the amount of images the system should take into account (history)**, to calculate the background model. The higher the history integer, the more images it will use to calculate the background model. By **increasing the history** you get **a more stable background** model, but a **less flexibl**e. As more images from the past are taken into account, the slower the background model will adapt to a new scenario. E.g. when a car drives into your street, and stands still for 5 minutes.
|
||||
|
||||
Finding the ideal history parameters, depends heavily in the application you want to use it. In practice this **is achieved by trial and error**.
|
||||
|
||||
### NMixtures
|
||||
|
||||
The erode parameter represents a structural element (a morphological operation), which will be used to minimize the changed pixels.
|
||||
|
||||
### Ratio
|
||||
|
||||
The erode parameter represents a structural element (a morphological operation), which will be used to minimize the changed pixels.
|
||||
|
||||
### Erode
|
||||
|
||||
Find a more detailed explanation at the [**Differential images section**](algorithms/Differential_images).
|
||||
|
||||
### Dilate
|
||||
|
||||
Dilate is exactly the same as the erode parameter, except that it has the reverse behaviour; instead of removing isolated pixels it will connect them. The dilate function is mainly used in segmentation techniques, to create **a more complete segment**; it fills gaps. The higher the number of the erode parameter, the more aggressive the dilating will be.
|
||||
|
||||
### Threshold
|
||||
|
||||
Find a more detailed explanation at the [**Differential images section**](algorithms/Differential_images).
|
||||
0
72_machinery/92_streaming.md
Normal file
0
72_machinery/92_streaming.md
Normal file
Reference in New Issue
Block a user