Comments (3)
Curiosity got the better of me and I hacked up a test of this feature. I didn't handle the comp_file thing and I wasn't sure about some of the frame copying, but basically I added a _highscore and a _highframe and when a motion event is closed up I dump the frame with cv2.imwrite.
It seems to work really well for my test cases. Mark-I Eyeball efficiency went up like 500%.
Other possibly useful things:
- printing the high score per event seems kind of helpful for tuning thresholds
- another vote for get_output_path
from dvr-scan.
This is a great idea!
Curiosity got the better of me and I hacked up a test of this feature. I didn't handle the comp_file thing and I wasn't sure about some of the frame copying, but basically I added a _highscore and a _highframe and when a motion event is closed up I dump the frame with cv2.imwrite.
That sounds like a reasonable approach to me. Feel free to push a PR to the develop branch if you would like. In the meantime will keep this open since this sounds like a great feature to have for a CLI tool like this.
from dvr-scan.
When looking at the feature I kinda realized it gets a little more complicated, particularly with the awkward combination of options available. i.e. bounding box doesn't make sense with ffmpeg as the output… unless you want bounding boxes in the thumbnails for your ffmpeg produced output.
At the risk of becoming too ffmpeg-like in complexity, it seems like some sort of output chain would serve implementing stuff like this. Like every time a motion event is closed up, it's just packaged up with its frame list and scores and sent down a chain of processors. One processor in the chain could be the video encoder output, and another might be a thumbnail producer.
I'm also sure someone will want some other variant of a thumbnail other than just the high scorer.
(And my end goal is actually to also feed a motion group to AI straight within python.)
Just something I thought about. If I make a reasonably crude-but-unobtrusive version of the thumb feature I'll send a PR.
Thanks!
from dvr-scan.
Related Issues (20)
- When using with wildcard, dvr-scan detects motion across two videos HOT 1
- ROI / region of interest not working HOT 1
- Request: Process video stream from stdin HOT 2
- wildcards produce different detection than file by file run HOT 4
- how do you install this program? HOT 6
- cv2 package got renamed to opencv-python and is now at 4.8.0.76 HOT 2
- Timecode format of hh:mm:ss not recognized HOT 3
- Process ends early and displays error: Element exceeds containing master element HOT 1
- Traceback TypeError for any dvr-scan command HOT 1
- cnt mode stuck HOT 4
- Invalid duration specification for ss: 00:04:60.000 when using -m copy or -m ffmpeg HOT 6
- Require version >= 0.6.2 of scenedetect
- Exception in encode thread when extracting motion events on v1.6 HOT 7
- Unsupported config option: region-file HOT 3
- region-editor config option gets ignored HOT 3
- Improve handling of videos that are corrupt or have decoding failures HOT 8
- Closing the ROI editor should warn if you have unsaved changes HOT 2
- use position_ms to determine timestamps HOT 3
- Filename issues HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dvr-scan.