DVR-Scan icon indicating copy to clipboard operation
DVR-Scan copied to clipboard

Non rectangular region of interest

Open matsalleh92 opened this issue 3 years ago • 1 comments

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.

matsalleh92 avatar Oct 04 '20 20:10 matsalleh92

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.

Breakthrough avatar Dec 12 '21 01:12 Breakthrough

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:

image

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.

Breakthrough avatar Sep 30 '23 23:09 Breakthrough

Fix will be included in v1.6 release, thanks!

Breakthrough avatar Oct 15 '23 05:10 Breakthrough

v1.6 is now out, feedback on the new feature is most welcome!

Breakthrough avatar Oct 16 '23 23:10 Breakthrough