-
Notifications
You must be signed in to change notification settings - Fork 664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
motion detection mask changes over time #2755
Comments
Probably somehow related to #2404. But the mask file is actually stored only when saving camera settings, AFAIK, so not sure how it can permanently change. It is definitely not related to a changing camera view width/height, e.g. due to changing browser window width or similar? Does it reset when you restart motionEye? However, as of my findings in the linked link, the whole mask code needs a cleanup. |
yeah i have the same problem. |
I tried to reproduce this with current dev branch with Motion v 4.5.1 by changing settings that don't affect the size or position of the video feeds (and thus I could easily check if the mask had moved), but couldn't get the mask to drift. It might of course be triggered by camera resolution (or aspect ratio), and mine produce different resolutions than @srmeister has, possibly they also differ from what @janlammertyn has. |
I can replicate this issue if the Resolution Dimmer is not set to 100%. Here is an example with the Resolution Dimmer set to 80%: I also noticed the following in the log files when this happens, |
Ok, now I managed to somewhat replicate the mask drift (I guess the amount of drift is related to how nicely the dimming factor divides the original resolution, or something like that). But it is still too small to be easily checked, so it would be great if someone could provide steps to reproduce this in the scale reported here. For some reason I also get a flood of repeated logging like below when enabling resolution dimmer, so I can't really use debug logging to inspect this 😞
Anyway, the mask files do get re-saved (and after that re-read) every time camera settings are changed regardless whether the mask has been edited, so any rounding errors etc can easily accumulate over time. |
I wonder if it would be possible to remedy this by using the I'm not quire sure if this is real, but having the mask displayed in UI affect the mask saved thereafter is quite problematic. I mean that the fact that the UI might have different frame resolution than what the camera actually produces seems to now "leak" to the mask used by Motion with the real camera video. Maybe the UI should display a copy of the mask that is in the "viewable resolution" but keep the unaltered one in store so it can be used when saving settings? |
Ah, I guess what is needed to reproduce this is to change the resolution dimmer and then go edit the mask, right? |
Like MichaIng mentioned above, it seems that the mask code indeed needs some work also for reasons other than the one mentioned here. I got horrific distortion in the grid causing weirdly sized mask tiles in the bottom and right edges when playing around with the resolution dimmer between mask edits 😬 |
I have a weird problem. The motion detection mask I use changes over time. It is like shifting downwards. For example, on the grid, I counted the number of masked blocks and open blocks in the first column. This is the result:
t0: 26 masked, 4 open, 12 masked
t1: 27 masked, 4 open, 11 masked
t2: 28 masked, 3 open, 11 masked
t3: 30 masked, 3 open, 9 masked.
I did not edit the mask in between.
MotionEye v0.43.0
Motion v 4.5.1
OS Ubuntu 22.04
The text was updated successfully, but these errors were encountered: