kerberos-io / machinery Goto Github PK
View Code? Open in Web Editor NEW(DEPRECATED) An open source image processing framework, which uses your USB-, IP- or RPi-camera to recognize events (e.g. motion).
Home Page: https://www.kerberos.io
(DEPRECATED) An open source image processing framework, which uses your USB-, IP- or RPi-camera to recognize events (e.g. motion).
Home Page: https://www.kerberos.io
Create a new capture device IPCamera
.
Hi there
I am running Kerberos v1.1.0 on a Pi2, installed via the kerberos-io-armv7-4GB-v110 image. I am using it with a D-Link DCS-932LB IP camera.
If I configure Kerberos to use the mjpeg stream (which I believe is from http://user:[email protected]/video.cgi), then it does not capture anything. I confirm this URL does work in the browser.
The log.stash gets the following error written to it every 10 seconds:
31-12-2015 10:10:26 4 - OpenCV : /home/kerberos-io/build/opencv/modules/highgui/src/cap_gstreamer.cpp:1622: error: (-2) GStreamer: your gstreamer installation is missing a required plugin
in function handlemessage
Alternatively, I can use the http://user:[email protected]/image.jpg instead, which works fine. I am not sure whether there is any benefit in my case of using the mjpeg stream over the image.jpg, but thought I'd let you know.
Please let me know if I can provide any more details.
Many thanks
We need to add an array of frames on the main thread
where the Harddrive thread will save to disk and get video\images from the array .
Implementation of a counter system (e.g.) people counter. Extensive description following.
When a wrong url has been entered for the IP camera, the system will hang, by continuously checking if the url is available. This is the reason why the "update" function looks like not working. For the moment the only work a around is to reboot the system.
The machinery requires extensive logging, for debugging purposes.
Hoping that kerberos can incorporate image flip
Implement IoWebhook
, send post request to a specific URL.
For performance and architectural reasons, the uploading of images to a S3 bucket should be managed by the machinery and not longer exists as a separate service (sync-s3).
We will need to use the AWS C++ library, and run a seperate thread in the machinery that will upload images to the S3 bucket.
Following features are needed
When runnning more than one instance on same machine i can't find any way to change the streaming port of the second instance. Is that feature enabled? Can i keep running second instance despite the bind sock error?
Because it's easier to work with and stream video to client/cloud instead of sending batches of images .
Now we can even consider to provide sound support for cameras with microphone or stand-alone microphones .
MJPEG will be implemented (C++ sockets), this will allow a user to view a live stream on the dashboard page. The MJPEG stream will work with any device: IP camera, USB camera or Rapsberry Pi camera.
First send the HTTP header
_write( client,"HTTP/1.0 200 OK\r\n" "Server: Mozarella/2.2\r\n" "Accept-Range: bytes\r\n" "Max-Age: 0\r\n" "Expires: 0\r\n" "Cache-Control: no-cache, private\r\n" "Pragma: no-cache\r\n" "Content-Type: multipart/x-mixed-replace; boundary=mjpegstream\r\n" "\r\n",0);
Keep sending the frames
sprintf(head,"--mjpegstream\r\nContent-Type: image/jpeg\r\nContent-Length: %lu\r\n\r\n",outlen); _write(clients[i],head,0); _write(clients[i],(char*)(&outbuf[0]),outlen
A toggle will be place on the dashboard wich makes it possible to switch between the activity (latest sequence of detection) and a live stream using a MJPEG image.
Following library will be used to draw the MJPEG on the canvas: https://github.com/WPI-RAIL/mjpegcanvasjs
A new repository will be created, named Pilot (other names are welcome). The Pilot project will provide a GUI in the terminal, to start and monitor multiple kerberos instances (multiple machinery running). This will allow us to control one or more camera's on a single Raspberry Pi.
A template matching algorithm can be executed on the image. One or more templates can be defined, and a output text can be assigned to a specific template. When the template matching was succesfull, other output devices "TCP- and/or Webhook device can be executed". This can be helpful to notify for recurrent events; for example the mail man.
Hello, I've been testing this out on a VM and so far I'm impressed. The one thing this project is missing is the ability to record video and not just single jpegs. Not sure if this is feasible, but it would be great for things like moving cars that are too fast to catch on one or two frames.
Add "sendMail" in the list of IO objects
moved from kerberos-io/web#44
Hey there. I installed this tonight and messed around, got it capturing some images. Everything looks very slick, must have been a lot of work. How many people are involved? Is it a company or private individual? Is it funded?
Currently the machinery is configured to start after 60 sec; the kerberos.timer
file. This delay is introduced, so the internal time of the Raspberry Pi was properly synced with the time server.
To start the machinery without a delay time, we need to use the After=
method of the kerberos.service
file. After the ntpd
service has synced the internal time, we can start the machinery. I'm not sure if the After=
method will work as expected, maybe the time syncing runs asynchronous.
Hello
kerberos looks fine, but
is it possible to add this in the next release?
I followed the installation tutorial for Raspian on Raspberry Pi 1. I had to run "sudo apt-get install -y systemd systemd-sysv" to get systemctl. It even didn't exist beforehand. But failed at this step:
pi@raspberrypi ~ $ sudo systemctl enable kerberosio
Failed to issue method call: Invalid argument
What could be the cause?
I want to hook onto gammu to send txt messages , now i cant see how to do that currently?
(unless i just trigger by image creation outside of kerberos)
Implement multithreading to handle incoming client sockets, this will solve the blocking client problem with Tablets and Smart Phones.
Problem
I think that the raspberry pi continues to be busy trying to handle previous requests for the live stream and these requests do not ever stop trying to be handled by the pi since it is a live stream request. I suspect that new requests to view the live stream queue up behind the original request, and since the first request is never completed, all subsequent requests are not completed.
Here is the case: I got the live stream to work for the first time in my browser. Then I asked my son to try to access the live stream on his iPhone (the live stream did not appear for him). I then asked my other son to try on his Android phone and he did see the live stream. When I went back to my browser, the live stream was no longer showing on my browser. So I tried to access the live stream from another browser on my laptop, and also my iPad. Sometimes is shows, most times the live stream does not show.
Answer
Your assumption is correct, it's indeed possible that a thread can block the streaming for other clients. We did not implement a separate thread that handles the different clients (for simplicity), and apparently this is causing the problem for your situation.
The situation you describe is exact what I mean; the problem with tables and smartphones is that they support background processes. An example: if you open a game with your IPad or Android Phone and go back to the homescreen, the process isn't actually closed. The game is still available (in memory), and you can re-open it very quickly, this is the idea of multi-tasking. If you we take the Kerberos example: your son opens the browser or another app to open the livestream, and goes back to the homestream. Because the process isn't closed, the socket isn't closed either, and it keeps alive. This causes the client socket to go in sleep mode (timeout), and as we didn't implemented threading, it will block the complete streaming process.
I created a slack channel and subscribe channel for webhook, I tested with postman which works fine but not working on machinery.
slack webhook is like: https://hooks.slack.com/services/<your-webhook-api-key>
instead of connecting to the mjpeg url of the ip camera ,
we will connect to the rtsp url which is more suitable for stream and have more control over the camera.
Hi i can't get any image from my ipcamera setted in kerberos.io configuration, i tried the url configured in kerberos-web from the browser, and it works fine. When i start kerberos the log of the machinery says:
OpenCV : /home/pi/kerberos-io/build/opencv/modules/imgproc/src/color.cpp:3739: error: (-215) scn == 3 || scn == 4 in function cvtColor
I can't understand if depends on my ipcamera stream because i don't have another ipcamera to test.
The disk output is set correctly i can't understand what's the problem. How can i test a MJPG stream to contribute debugging?
Thanks in advance.
Luigi B.
The main issue we're currently having is to prepare a new release of Kerberos.io. How it's working for the moment:
Each of the steps above needs to be repeated for every device (processor). It takes a lot of time to do so, and it's a very operational task. It would be great to have an automated build flow, suggested by @JasonSwindle (#13). Combining Buildroot with a docker image of kerberos will be more efficient for development and release management.
Howdy,
I can currently working on seeing if I can docker-ize this product. I think huge improvements could be made by shipping the different aspects in containers that link to each other. My step are to get a good build work-flow, which is semi-done. I was able to get a kerberos binary built on my Debian box. What do you think?
A class which will wrap Cloud-upload and Hard-drive persisting in order to give the option
to save only to cloud/hd and fallback in cased of internet connection problem/no space on HD .
It would be useful to have an expositor for configuring more than one region. The behavior could be like the Hull Expositor to paint N rectangles on the image. This kind of expositor should help to monitor many sub-regions, for outdoor surveillance context and to avoid monitoring of non sensible areas, such as pedestrians passage.
Hi,
I think it will be good to split make to make and make install.
v1 works just fine with my pi wifi installed with kios, but v2 set up the same always ends up with no device on wpa_supplicant
Hi
I cant get the SD Image to run in pi 3
I can install OpenCV, PHP, python, etc over Openwrt, its possible install machinery in this plataform?
In order to run multiple kerberos instances , right now it's needed to create different config files for each instance. ๐
instead: enable main.cpp to receive parameters to override the config files
which is easier way to maintain multiple instances. ๐
Build failed in installation step as following:
pi@raspberrypi:~/machinery/build $ cmake .. && make && make check && sudo make install External project: Googletest External project: OpenCV Bind project: Userland External project: RaspiCam External project: Restclient -- Configuring done -- Generating done -- Build files have been written to: /home/pi/machinery/build [ 8%] Built target googletest [ 16%] Built target opencv [ 24%] Built target raspicamera [ 32%] Built target restclient [ 36%] Built target ENCODE_LIBRARY [ 36%] Built target rerun [ 41%] Built target FILEWATCHER_LIBRARY [ 42%] Built target EXECUTOR_LIBRARY [ 46%] Built target TINYXML_LIBRARY [ 60%] Built target KERBEROS_CORE [ 61%] Built target MMAPGPIO_LIBRARY [ 78%] Built target kerberosio Linking CXX executable ../../test/bin/kerberos-test /usr/bin/ld: cannot open output file ../../test/bin/kerberos-test: No such file or directory collect2: error: ld returned 1 exit status test/CMakeFiles/kerberos-test.dir/build.make:607: recipe for target '../test/bin/kerberos-test' failed make[2]: *** [../test/bin/kerberos-test] Error 1 CMakeFiles/Makefile2:1536: recipe for target 'test/CMakeFiles/kerberos-test.dir/all' failed make[1]: *** [test/CMakeFiles/kerberos-test.dir/all] Error 2 Makefile:147: recipe for target 'all' failed make: *** [all] Error 2
First install on Ubuntu did not success .
I have tested kerberos on a Raspberry pi B+ and a Raspberry Pi 2 B+. Both seemed to be working great until I attempted to upgrade them using the "pacman" package manager. When visiting the kerberos web page, it showed no information for all categories. I rebooted after the upgrade and still did not show any history of activity. Nor did it show any new activity.
I'm not sure if this is the correct repo to report this issue.
I installed KerberosIO on Raspbian (rpi2), it works fine with a usb webcam, but after a few hours the feed is not available anymore and I need to restart the service. The log doesn't tell me anything either, last entry is "Starting stream on port 8888"
Frequently there is no new capture on webcam. The CPU usage is 100% on one core. This is installed on a rasberry pi 2 using your sdcard image. (32 GB)
PID USER PR NI VIRT RES %CPU %MEM TIME+ S COMMAND
29528 root 20 0 125.5m 47.3m 120.9 5.5 0:06.11 R grunt
29478 pi 20 0 7.0m 2.9m 2.0 0.3 0:01.01 R top
7 root 20 0 0.0m 0.0m 0.7 0.0 11:08.51 S rcu_preempt
139 root 20 0 80.4m 42.9m 0.7 5.0 12:19.35 S systemd-journal
1 root 20 0 23.3m 4.9m 0.0 0.6 3:26.24 S systemd
2 root 20 0 0.0m 0.0m 0.0 0.0 0:00.07 S kthreadd
3 root 20 0 0.0m 0.0m 0.0 0.0 0:49.81 S ksoftirqd/0
5 root 0 -20 0.0m 0.0m 0.0 0.0 0:00.00 S kworker/0:0H
8 root 20 0 0.0m 0.0m 0.0 0.0 0:00.05 S rcu_sched
9 root 20 0 0.0m 0.0m 0.0 0.0 0:00.00 S rcu_bh
10 root rt 0 0.0m 0.0m 0.0 0.0 0:00.81 S migration/0
11 root rt 0 0.0m 0.0m 0.0 0.0 0:00.72 S migration/1
12 root 20 0 0.0m 0.0m 0.0 0.0 0:15.79 S ksoftirqd/1
14 root 0 -20 0.0m 0.0m 0.0 0.0 0:00.00 S kworker/1:0H
15 root rt 0 0.0m 0.0m 0.0 0.0 0:00.46 S migration/2
16 root 20 0 0.0m 0.0m 0.0 0.0 0:14.74 S ksoftirqd/2
18 root 0 -20 0.0m 0.0m 0.0 0.0 0:00.00 S kworker/2:0H
19 root rt 0 0.0m 0.0m 0.0 0.0 0:00.51 S migration/3
20 root 20 0 0.0m 0.0m 0.0 0.0 0:11.60 S ksoftirqd/3
22 root 0 -20 0.0m 0.0m 0.0 0.0 0:00.00 S kworker/3:0H
23 root 0 -20 0.0m 0.0m 0.0 0.0 0:00.00 S khelper
24 root 20 0 0.0m 0.0m 0.0 0.0 0:00.00 S kdevtmpfs
25 root 0 -20 0.0m 0.0m 0.0 0.0 0:00.00 S netns
27 root 20 0 0.0m 0.0m 0.0 0.0 0:00.19 S khungtaskd
28 root 0 -20 0.0m 0.0m 0.0 0.0 0:00.00 S writeback
29 root 25 5 0.0m 0.0m 0.0 0.0 0:00.00 S ksmd
30 root 0 -20 0.0m 0.0m 0.0 0.0 0:00.00 S crypto
31 root 0 -20 0.0m 0.0m 0.0 0.0 0:00.00 S kintegrityd
32 root 0 -20 0.0m 0.0m 0.0 0.0 0:00.00 S bioset
33 root 0 -20 0.0m 0.0m 0.0 0.0 0:00.00 S kblockd
34 root 0 -20 0.0m 0.0m 0.0 0.0 0:00.00 S md
36 root 0 -20 0.0m 0.0m 0.0 0.0 0:00.00 S rpciod
52 root 20 0 0.0m 0.0m 0.0 0.0 0:00.00 S kswapd0
53 root 20 0 0.0m 0.0m 0.0 0.0 0:00.00 S fsnotify_mark
54 root 0 -20 0.0m 0.0m 0.0 0.0 0:00.00 S nfsiod
55 root 20 0 0.0m 0.0m 0.0 0.0 0:00.00 S jfsIO
56 root 20 0 0.0m 0.0m 0.0 0.0 0:00.00 S jfsCommit
57 root 20 0 0.0m 0.0m 0.0 0.0 0:00.00 S jfsCommit
58 root 20 0 0.0m 0.0m 0.0 0.0 0:00.00 S jfsCommit
59 root 20 0 0.0m 0.0m 0.0 0.0 0:00.00 S jfsCommit
60 root 20 0 0.0m 0.0m 0.0 0.0 0:00.00 S jfsSync
61 root 0 -20 0.0m 0.0m 0.0 0.0 0:00.00 S xfsalloc
62 root 0 -20 0.0m 0.0m 0.0 0.0 0:00.00 S xfs_mru_cache
69 root 0 -20 0.0m 0.0m 0.0 0.0 0:00.00 S pencrypt
70 root 0 -20 0.0m 0.0m 0.0 0.0 0:00.00 S pdecrypt
77 root 0 -20 0.0m 0.0m 0.0 0.0 0:00.00 S kthrotld
78 root 1 -19 0.0m 0.0m 0.0 0.0 0:00.00 S VCHIQ-0
79 root 1 -19 0.0m 0.0m 0.0 0.0 0:00.00 S VCHIQr-0
80 root 0 -20 0.0m 0.0m 0.0 0.0 0:00.00 S VCHIQs-0
All is resolved when I restart. But the problem come back again in 1-2 days.
Thank you
[ 11%] Built target googlemock
[ 22%] Built target googletest
[ 33%] Built target opencv
[ 40%] Built target FILEWATCHER_LIBRARY
[ 42%] Built target EXECUTOR_LIBRARY
[ 47%] Built target TINYXML_LIBRARY
[ 64%] Built target KERBEROS_CORE
Linking CXX executable ../../bin/kerberos
CMakeFiles/kerberos.dir/kerberos/machinery/io/IoDisk.cpp.o: In function `kerberos::IoDisk::buildPath(std::string)': /home/user/src/kerberos-io/src/kerberos/machinery/io/IoDisk.cpp:35: undefined reference to `std::string kerberos::helper::to_string<int>(int const&)'
/home/user/src/kerberos-io/src/kerberos/machinery/io/IoDisk.cpp:38: undefined reference to `std::string kerberos::helper::to_string<int>(int const&)'
CMakeFiles/kerberos.dir/kerberos/machinery/io/IoDisk.cpp.o: In function `kerberos::IoDisk::save(kerberos::Image&, rapidjson::GenericDocument<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>, rapidjson::CrtAllocator>&)':
/home/user/src/kerberos-io/src/kerberos/machinery/io/IoDisk.cpp:88: undefined reference to `std::string kerberos::helper::to_string<int>(int const&)'
/home/user/src/kerberos-io/src/kerberos/machinery/io/IoDisk.cpp:104: undefined reference to `std::string kerberos::helper::to_string<int>(int const&)'
kerberos/libKERBEROS_CORE.a(Capture.cpp.o): In function `kerberos::Capture::setup(std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > >&, int, int)':
/home/user/src/kerberos-io/src/kerberos/capture/Capture.cpp:7: undefined reference to `std::string kerberos::helper::to_string<int>(int const&)'
kerberos/libKERBEROS_CORE.a(Capture.cpp.o):/home/user/src/kerberos-io/src/kerberos/capture/Capture.cpp:8: more undefined references to `std::string kerberos::helper::to_string<int>(int const&)' follow
collect2: error: ld returned 1 exit status
src/CMakeFiles/kerberos.dir/build.make:314: recipe for target '../bin/kerberos' failed
make[2]: *** [../bin/kerberos] Error 1
CMakeFiles/Makefile2:1066: recipe for target 'src/CMakeFiles/kerberos.dir/all' failed
make[1]: *** [src/CMakeFiles/kerberos.dir/all] Error 2
Makefile:86: recipe for target 'all' failed
make: *** [all] Error 2
Not sure if I'm missing a library or something, but it doesn't seem like it.
supported by real only one camera or multiple cameras can be connected?
Why is it calling the hades.kerberos website by every run/clean script and why is it accessing bitbucket every 2 seconds?
Raspberry Pi camera shows dark images and doesn't operate at night.
First, thanks for some very awesome software!
I was wondering if it would be possible to have options added for the Algorithm, Expositor, and Heuristic passways, so that they're not evaluated, they just return True. For my use case, I want to have the system save a snapshot every X seconds, with no image processing or other decisions required. Having the system evaluate each image for changes just burns CPU needlessly.
This might be a fringe use case, but I wanted to ask regardless.
Again, thanks for a very useful and user-friendly system!
It would be helpful, if multiple camera's can be processed on a single machine. Therefore it should be possible to run one or more instances.
To make this possible a user should be able to pass parameters which can override the exisiting configuration files.
E.g.
kerberosio --capture IPCamera --captures.IPCamera.url rtsp://camera1--name ipcamera1
kerberosio --capture IPCamera --captures.IPCamera.url rtsp://camera2--name ipcamera2
kerberosio --capture IPCamera --captures.IPCamera.url rtsp://camera3--name ipcamera3
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.