DVR-Scan
DVR-Scan copied to clipboard
Non rectangular region of interest
Would there be a way to have a non rectangular (polygon) region of interest like in ZoneAlarm?
In my specific case there are trees that blow in the wind that trigger detection, but the position of the camera does not allow easy removal from the ROI using a rectangle.
I think the best way to approach this would be to allow specifying an image as a mask - either multiplying it with the image in RGB. That way you can make a mask by saving a frame from the video and painting the parts you want included in white and excluded in black.
We should also allow an alpha channel to be specified in which case that would be used as the mask itself.
I've gone back on using image masks and managed to come up with a workable GUI solution. Here's a sample of what's to come:
You can use the mouse to drag existing points or add new ones, to define arbitrary shapes. I don't know if the GUI will support multiple shapes for the first iteration, but it might in the future. However, on command line and via config file, you will be able to specify multiple non-rectangular ROIs that may or may not overlap.
This isn't functional yet, but should be soon - I'll post an update when something is available for folks to test out. Thanks!
P.S. If anyone still wants to use image masks for this purpose, feel free to file an issue for that and I can look into it.
Fix will be included in v1.6 release, thanks!
v1.6 is now out, feedback on the new feature is most welcome!