Page 1 of 1

Improving modect & Scanning existing event files for motion

Posted: Sun May 01, 2011 1:39 am
by agoodm
I am currently working on software to tie together functions in Into http://intopii.com/into/ to scan your existing event image files for motion. I am not a coder and this is the first time I have ever worked with C style code. However I can work from example and use my initiative.

Into is currently in closed beta and the code is licensed under some variation of the LGPL and therefore I think the code could be utilised for improving the motion detection in Zoneminder. Certainly the code I have written so far highlights motion far more accurately and precisely than the Zoneminder zones I have spent so long creating.

Into is cross platform, Windows, Mac and Linux. I am working with it on Windows, but thats only because this is the most powerful machine I have.

You can get a copy of Into by signing up.

The code I have so far can be seen here: http://pastebin.com/CdyNZB4n

It pulls the image files from the file system, passes them through a couple filters and them writes the image files to disk. The commented out database stuff doesn't work.

What works:
Reading in the image files from a single folder
Once settled down; accurately detecting the motion and outputting an image that could be fed into the PiiThresholdingOperation class

What doesnt work:
The first 200 or so frames are unusable due to some unknown issue, possibly with my implementation.
Reading from multiple folders
Writing information to a database file(csv in my case)

Any suggestions or help getting this going would be appreciated.

A person far more talented than me could most likely craft this into another method of detecting motion in Zoneminder. If it is indeed more accurate than existing methods?

Re: Improving modect & Scanning existing event files for mot

Posted: Fri May 06, 2011 2:46 pm
by Normando
Looks very promising! Thanks

Re: Improving modect & Scanning existing event files for mot

Posted: Tue May 17, 2011 10:13 pm
by agoodm
Got this working.

My code*:

copy.cc : http://pastebin.com/sLGnszTk
Detector.cc : http://pastebin.com/YBPBzwqm
Detector.h : http://pastebin.com/7hBstQVy

* Written with a ton of help from Topii @ Intopii - many thanks go out to this man - top man.

Youll need a working qt dev environment and the Into beta files.

Itll scan through your images and write the filenames of any images with more than 2000 non background images (as decided by the background extractor) to a csv file.

You should tweak the thresholds and background extractor settings for your needs.

Not sure what to do with my outputfile.csv which has 70k images listed tho :-/