maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] WatchDog - Motion Detector + Time Lapse (https://talk.maemo.org/showthread.php?t=86285)

tetris11_ 2012-08-24 14:02

[Announce] WatchDog - Motion Detector + Time Lapse
 
http://s13.postimage.org/bn4f71653/S...824_121450.png http://s14.postimage.org/8yhw5q24h/S...824_121549.png

http://s14.postimage.org/rgm8pyjwh/S...824_122054.png http://s16.postimage.org/a58v13rb9/S...824_122610.png

Hi folks :)

This is a small motion detector I wrote using the CImg library and FCam API.

The App is split into 3 components:
  • Motion Detector
    Detects motion and records to file. Can also send images via email.
    • Mask Size: Determines sensitivity of motion detection. The lower, the more sensitive (and more false positives). A high mask is generally favoured. If you specify a large image size, then you should specify a high mask too.
    • Show Image: Tickbox ensures that the frame where movement was detected will be shown. This comes up as a purplish image due to QPicture and FCam having wierd color issues. Will sort out later.
    • Threshold (the lower it is, the more sensitive)
    • Duration (HH:mm:ss) (default 00:01:00)
    • Max and Min Intervals. You don't want the detector checking for motion every second, so to save resources it fluctuates between these two interval ranges.
      Initially it starts at an interval halfway between the Max and Min. If motion is detected, it halves the interval and checks again. If motion is still occuring it keeps halving down to the min limit.
      If motion is not detected for 10 frames, the interval is doubled, and so forth, up to the max interval.
    • Modifier affects the halving/doubling of the interval. Lower = more sensitive, Higher = least sensitive.
    • Image sizes (320x240, 640x480, 800x600, 1280x960)
    • Image save directory. When motion is detected, movement frames are saved here.
    • Options to convert images to MPG when finished, and to delete images.
    • Email option to email user with an attached image of movement.
  • Time Lapse
    Records images at specified intervals. Essentially just a cronjob, but uses libalarmd.
    • Until: Specify the day and time to end photo capture.
    • Repeat: The frequency of photo cpature, up to the Until date. Repeat Never option takes just a single photo at that date
    • Image: Image size and framerate of video (if user wants to convert)
  • IP Streamer
    This is not working yet. This will essentially be the slot to launch a completely revamped version my current PhoneStreamer App. I've made a lot of changes to Phonestreamer, but haven't had time to implement it into the WatchDog yet. Todo.

There is also commandline functionality for remote usage, and users can run the app with various flags and switches.
For more info:

Code:

/opt/watchdog/bin/watchdog --help
note: weird bug where it throws an error for certain time values.
fix: Add
Code:

PATH=$PATH: /opt/watchdog/bin/
export PATH"

to the end of /etc/profile. Restart phone, then just run
Code:

watchdog -x -y -z -etc
where x y z etc are whichever flags you choose.


Installation
On extras-devel! Just need to update and install:
Code:

root
apt-get install fcam-dev fcam-drivers
apt-get update && apt-get install watchdog

TODO
* Fix layout bugs
* Fix target bug for timelapser
* Add SMS, warning sound
* Port to Harmattan


Warning
It works, but it's buggy as hell and will crash on you at least once - I am warning you that of now.

It was developed in just a few weeks and so there hasn't been much time to polish it. Absolutely will do once I finish the writeup, but till then - hang on.

Also, if you guys could post any bugs or suggestions here, I'd be really grateful. Thanks guys :)

Old-Deb Link: https://docs.google.com/open?id=0B0-...lBXUjZFT2d6T0U

deed 2012-08-24 19:35

Re: [Announce] WatchDog - Motion Detector + Time Lapse
 
hi!

I just wanted to say whaaa! and to thank you very much for this wonderfull app.
It seems that nowadays, developing for n900 does not get the deserved audience... things go that way and this baby is now getting old!, but thanks to genius developers like you (and few others of course!) the "THING" is still unbeatable and, at least for me nothing compare to the n900.

Thanks to those devs who make it feel new day after day and good luck.

_For the few tests I made till now, this app seems to work flawlessly

tetris11_ 2012-08-25 10:33

Re: [Announce] WatchDog - Motion Detector + Time Lapse
 
You're so right man - nothing comes close to the n900.

I keep looking out there on the market expecting to see better phones, only to see closed-source wannabe's with higher specs. I spit on them, they're not real devices.

<rant>
Nokia deserve a real round of applause for what they tried to do with this phone and Qt. Sure it's not a completely open phone, but it was a brave step in the right direction and Qt is by far one of the best framework's out there - almost every OS uses Qt apps in form or another.

But then they got scared. Nokia dropped Maemo, then Meego, and even shunned Symbian to choose Windows. Not only that, but they sold Qt (despite the fact that Qt was doing very well at the time) to Digia.

I love this community, and I have nothing but undying respect for those who maintain CSSU. Nokia are such bastards to turn their backs on all the loyal devs that have followed them so far.

Rignt now I have my eye on Project Tizen. When they release that, then I'll maybe stick my head out for a new phone.

Edit: No I won't, Tizen has dropped Qt. They're not making this easy.....

Till then, all the current ones can go **** themselves. :)
</rant>

HtheB 2012-08-25 12:35

Re: [Announce] WatchDog - Motion Detector + Time Lapse
 
Great that people still develop for our beloved N900

any Harmattan version in the plan? :D

tetris11_ 2012-08-25 13:20

Re: [Announce] WatchDog - Motion Detector + Time Lapse
 
Heh, it shouldn't be too hard to port. I'll add it to the the TODO after I finish pollishing it a few weeks from now

Crogge 2012-08-25 14:08

Re: [Announce] WatchDog - Motion Detector + Time Lapse
 
Great work, my N900 will be happy :)

imo 2012-08-25 14:13

Re: [Announce] WatchDog - Motion Detector + Time Lapse
 
simply amazing

tetris11_ 2012-09-01 16:53

Re: [Announce] WatchDog - Motion Detector + Time Lapse
 
^ Thank you!

Guys, don't mean to sound ungrateful, but the lack of responses so far has been staggering.... exactly how many of you still own N900's?

If you've still got yours lying around somewhere, but are attached to your new phone (whatever it may be), then this is the perfect end-app for it.

Just stick in a secret location and watch people come and go. Or use it as a doorbell securicam, which sends you an email everytime someone knocks on the door.

recluse 2012-09-02 11:07

Re: [Announce] WatchDog - Motion Detector + Time Lapse
 
1. Can you combine all features?
That is: Stream a timelapse over IP that only records when there is motion.
This would be useful for watching my guinea pigs.

2. Can you get it to work on Nokia N9 (Harmattan)?

fw190 2012-09-02 17:30

Re: [Announce] WatchDog - Motion Detector + Time Lapse
 
Will you put it someday in the repos?


All times are GMT. The time now is 22:34.

vBulletin® Version 3.8.8