Trouble with zone rectangles appearing in images along with edge detection

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
CyberMage
Posts: 6
Joined: Fri May 01, 2015 12:18 am

Trouble with zone rectangles appearing in images along with edge detection

Post by CyberMage »

Just set up a Docker image with ZM v1.36.8 and attached a single camera.

I'm having problems with false positives in motion detection every so often and when I look in the frames to see what triggered it I see something that appears to be edge detection, with a rectangle overlayed that matches the motion detection zone I've set. Clearly it's somehow screwing up the motion detection process and bleeding through some of the processing images which of course makes that frame way different from the before and after frame which causes it to alarm. Does this day and night.

Sometimes it's up to 8 frames in a row that look like this:
bad-dark.jpg
bad-dark.jpg (225.17 KiB) Viewed 2399 times

This frame is usually just sandwiched between perfectly good frames that look like this one:

good-dark.jpg
good-dark.jpg (78.98 KiB) Viewed 2399 times

When I connect to the stream on the camera directly I never see anything out of the ordinary. The camera is a GW5037IP providing h264.
CyberMage
Posts: 6
Joined: Fri May 01, 2015 12:18 am

Re: Trouble with zone rectangles appearing in images along with edge detection

Post by CyberMage »

So nobody has seen this before? My one camera is producing > 500 false positives in modect a day because of this.
User avatar
Andyrh
Posts: 281
Joined: Sat Oct 28, 2017 3:55 am

Re: Trouble with zone rectangles appearing in images along with edge detection

Post by Andyrh »

I could be wrong, but I had something similar that was camera noise. Pixels would be one color and the next frame be almost the same color. Not all of the pixels, but mostly in a group. I altered the Min/Max Pixel Threshold (0-255) by raising the bottom number a little at a time until the problem went away. I ended with 17 on the low end.
My issue only happened at night, I suspect is was stray light from UFOs beaming people up, but it could have been cars turning a block away, who knows...
Andy
o||||o

Ubuntu 22.04
ZM 1.36.33
E5-1650-v4 Xeon
16 GB RAM
6 cameras -> 54 FPS modect
CyberMage
Posts: 6
Joined: Fri May 01, 2015 12:18 am

Re: Trouble with zone rectangles appearing in images along with edge detection

Post by CyberMage »

While alien invasions offer a plausible answer, in this case it's definitely not generated by the camera and isn't just noise. It's clearly a frame with edge detection and zone rectangle overlay applied, and occurs all through the day and night.

This must be caused by something in the modect processing (ffmpeg?). I don't know enough about the processing for motion to know what's going on, but I assume it is doing edge detection on a frame, applies the zone mask, then compares against the same processing for the previous X frames. Somehow it's either double processing frames or getting mixed up as to what is a source frame and what has the edge and mask applied already. Somehow not only is it triggering motion but it leaves 5 to 20 of those processed frames in the recorded stream and logs an event.
User avatar
kitkat
Posts: 193
Joined: Sun Jan 27, 2019 5:17 pm

Re: Trouble with zone rectangles appearing in images along with edge detection

Post by kitkat »

Try setting the Video Writer to Camera Passthrough.
CyberMage
Posts: 6
Joined: Fri May 01, 2015 12:18 am

Re: Trouble with zone rectangles appearing in images along with edge detection

Post by CyberMage »

Gave your suggestion a try but no luck.
User avatar
kitkat
Posts: 193
Joined: Sun Jan 27, 2019 5:17 pm

Re: Trouble with zone rectangles appearing in images along with edge detection

Post by kitkat »

If the Writer is Camera Passthrough then ZoneMinder isn't touching the recorded stream, so I'm not sure how it could be causing artefacts.
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: Trouble with zone rectangles appearing in images along with edge detection

Post by Magic919 »

So it’s the camera or aliens.
-
User avatar
Andyrh
Posts: 281
Joined: Sat Oct 28, 2017 3:55 am

Re: Trouble with zone rectangles appearing in images along with edge detection

Post by Andyrh »

My mistake, I thought you had the analyses frames turned on because that is the view I saw when I had them on and was tweaking the detection.
Andy
o||||o

Ubuntu 22.04
ZM 1.36.33
E5-1650-v4 Xeon
16 GB RAM
6 cameras -> 54 FPS modect
CyberMage
Posts: 6
Joined: Fri May 01, 2015 12:18 am

Re: Trouble with zone rectangles appearing in images along with edge detection

Post by CyberMage »

Maybe it is analysis frames but it doesn't show on most frames that do detect valid motion. Maybe I just am getting regular false positives and for some reason it's showing that.

More testing supports that and gives me the same results someone else has reported on the forums - but I don't know how to turn analysis frames on or off so this was quite surprising:
It seems that the analysis frames are not shown on video playback but require clicking on "frames" or "alarm frames" in the event view. Then, clicking on one of the alarm frame numbers (in red) will show the outline of the Blob identified. Selecting any other frame and stepping forward to alarm frames will not show the blob outline.
Post Reply