Page 1 of 1

1.19.5 : stuck event, captures hundreds of no-motion frames

Posted: Mon Oct 04, 2004 4:14 am
by awebsurfer
I've got a bit of a sticky bug: the capture seems to sometimes "stick" and create very long events, even when there's no substantial motion in the frames. This monitor is set to 5 FPS; everything else is set to defaults.

To demonstrate, I took a set of analysis-marked frames and made an AVI of one event: this happened right in the middle of an otherwise 'normal' set of small events.
http://www.troyandjessica.com/zm/zoneminder-bug.avi 2.5MB

After a few tweaks to compensate for what I assumed was over-senstive settings, I came up with the same problem here:

http://www.troyandjessica.com/zm/7043bug-msmpeg4.avi 3.4MB

There is a "blob" just stuck in the "detected" state, and it won't release and go on. I have archived this event, and have the statistics stored for the individual frames; if this is useful for debugging, let me know and I can zip up a database dump or something.

Sample:
Frame 7043-106
Zone Alarm Px Filter Px Blob Px Blobs Blob Sizes Alarm Limits Score
All 3771 (4%) 3040 (3%) 1759 (2%) 1 1759-1759 (2%-2%) 155,102-294,134 2

Frame 7043-107
Zone Alarm Px Filter Px Blob Px Blobs Blob Sizes Alarm Limits Score
All 3747 (4%) 3022 (3%) 1741 (2%) 1 1741-1741 (2%-2%) 156,103-294,133 2

Is this a bug in the new "Alarm Frame Count" feature? It's set to '2'. There are no large values or anything obviously wrong that I can tell.

Thanks for your help!

Posted: Mon Oct 04, 2004 7:58 am
by zoneminder
Hi,

This is a little odd. The videos demonstrate it quite well, especially the second one. I have a couple of questions.

1) What is the reference blend percentage on your monitor? The video seems to imply that the reference image never gets completely updated. There are a couple of config settings which may affect this, they are ZM_BLEND_ALARMED_IMAGES and ZM_FAST_IMAGE_BLENDS, perhaps you could check the settings of those as well in Options->Config

2) Can you dump the settings of your zones and post those? The easiest thing is probably just to run zmu -q -v -m <monitor id> to dump the whole monitor actually (you may need the -U and -P options for username and password).

If we start with that we might get somewhere. If not then we'll have to move onto the stats.

Phil,

Posted: Mon Oct 04, 2004 8:37 pm
by awebsurfer
Checking...

ZM_BLEND_ALARMED_IMAGES is not checked.
ZM_FAST_IMAGE_BLENDS is checked.

When I set this system up, I generally chose whichever options implied best performance, because the capture machine is a Celeron 400 with 128MB RAM. :roll: It runs relatively well, but the load average is around 0.50 and uses 30MB of swap constantly. It doesn't take much to push it over the edge.

Methinks it's time to get a more substantial PC rather than equipment my previous employer was literally throwing away.

Here is the dump of the problematic monitor:

Code: Select all


Monitor 4(SonyNightshot)
Id : 4
Name : SonyNightshot
Type : Local
Device : 1
Channel : 2
Format : 1
Width : 320
Height : 240
Palette : 4
Colours : 3
Event Prefix : Event-
Label Format : %%s - %y/%m/%d %H:%M:%S
Label Coord : 0,0
Image Buffer Count : 100
Warmup Count : 25
Pre Event Count : 10
Post Event Count : 10
Alarm Frame Count : 1
Section Length : 600
Maximum FPS : 5.00
Reference Blend %ge : 10
Function: 3 - Motion Detection
Zones : 1
  Id : 4
  Label : All
  Type: 1 - Active
  Limits : 0,0 - 319,239
  Alarm RGB : ff0000
  Check Method: 3 - Blobs
  Min Pixel Threshold : 25
  Max Pixel Threshold : 0
  Min Alarm Pixels : 2304
  Max Alarm Pixels : 57600
  Filter Box : 3,3
  Min Filter Pixels : 2304
  Max Filter Pixels : 57600
  Min Blob Pixels : 1536
  Max Blob Pixels : 0
  Min Blobs : 1
  Max Blobs : 0
The "wholescale lighting changes" comment in the BLEND_ALARMED_IMAGES help seems to imply that unchecking this option can resolve persistent alarms; I think I unchecked it while trying to get around this issue.

I suspect there's just some little fiddling somewhere, maybe a clobbered setting. Thanks for your help investigating this!

Posted: Mon Oct 04, 2004 9:11 pm
by zoneminder
This looks mostly ok, except that ZM_BLEND_ALARMED_IMAGES should probably be on. Otherwise the reference image is never updated whilst an alarm occurs. Your second AVI looks like a classic case of this. I think it's only useful to uncheck if you have a camera covering something like a vault where the reference image is supposed to be truly static and you want to detect things that might slowly sidle into the frame. In your case I would switch it on.

Other than that I don't see anything obvious. Maybe you can post some of the stats of a long event (or mail them to me) and I'll see if there;s anything in there.

Phil,

Posted: Tue Oct 05, 2004 4:26 am
by awebsurfer
Here are a few dozen 477 rows of stats from event 7043.

Code: Select all

"MonitorId";"ZoneId";"EventId";"FrameId";"AlarmPixels";"FilterPixels";"BlobPixels";"Blobs";"MinBlobSize";"MaxBlobSize";"MinX";"MaxX";"MinY";"MaxY";"Score"
"4";"4";"7043";"12";"4931";"3872";"3306";"2";"1605";"1701";"9";"266";"82";"128";"4"
"4";"4";"7043";"13";"4834";"3727";"3397";"2";"1536";"1861";"9";"276";"82";"129";"4"
"4";"4";"7043";"15";"4508";"3553";"1727";"1";"1727";"1727";"161";"296";"101";"130";"2"
"4";"4";"7043";"16";"4547";"3652";"1820";"1";"1820";"1820";"139";"275";"95";"126";"2"
"4";"4";"7043";"17";"4617";"3775";"2212";"1";"2212";"2212";"138";"287";"88";"129";"2"
"4";"4";"7043";"18";"4621";"3794";"2318";"1";"2318";"2318";"144";"293";"90";"129";"3"
"4";"4";"7043";"19";"4619";"3844";"2301";"1";"2301";"2301";"152";"291";"92";"131";"2"
"4";"4";"7043";"20";"4582";"3762";"2238";"1";"2238";"2238";"152";"289";"94";"131";"2"
"4";"4";"7043";"21";"4573";"3804";"2218";"1";"2218";"2218";"152";"291";"97";"131";"2"
"4";"4";"7043";"22";"4619";"3822";"1655";"1";"1655";"1655";"201";"291";"98";"131";"2"
"4";"4";"7043";"25";"4289";"3533";"2117";"1";"2117";"2117";"152";"297";"100";"133";"2"
"4";"4";"7043";"26";"3977";"3240";"1886";"1";"1886";"1886";"155";"293";"102";"133";"2"
"4";"4";"7043";"28";"3908";"3143";"1769";"1";"1769";"1769";"155";"293";"103";"133";"2"
"4";"4";"7043";"29";"3833";"3152";"1732";"1";"1732";"1732";"156";"290";"102";"133";"2"
"4";"4";"7043";"30";"3800";"3121";"1673";"1";"1673";"1673";"155";"286";"103";"131";"2"
"4";"4";"7043";"31";"3773";"3133";"1740";"1";"1740";"1740";"156";"293";"103";"132";"2"
"4";"4";"7043";"32";"3723";"3080";"1742";"1";"1742";"1742";"156";"293";"102";"132";"2"
"4";"4";"7043";"33";"3674";"3003";"1738";"1";"1738";"1738";"155";"293";"102";"132";"2"
"4";"4";"7043";"34";"3380";"2854";"1683";"1";"1683";"1683";"157";"294";"104";"133";"2"
"4";"4";"7043";"35";"3625";"3000";"1733";"1";"1733";"1733";"156";"294";"103";"133";"2"
"4";"4";"7043";"36";"3605";"2994";"1742";"1";"1742";"1742";"156";"294";"103";"133";"2"
"4";"4";"7043";"37";"3641";"3040";"1747";"1";"1747";"1747";"156";"294";"103";"133";"2"
"4";"4";"7043";"38";"3675";"3054";"1758";"1";"1758";"1758";"156";"294";"102";"133";"2"
"4";"4";"7043";"39";"3712";"3000";"1725";"1";"1725";"1725";"156";"294";"103";"133";"2"
"4";"4";"7043";"40";"3694";"3013";"1746";"1";"1746";"1746";"156";"293";"103";"133";"2"
"4";"4";"7043";"41";"3693";"3053";"1741";"1";"1741";"1741";"156";"293";"103";"133";"2"
"4";"4";"7043";"42";"3663";"3035";"1765";"1";"1765";"1765";"156";"294";"103";"133";"2"
"4";"4";"7043";"43";"3657";"3033";"1753";"1";"1753";"1753";"155";"293";"103";"133";"2"
"4";"4";"7043";"44";"3672";"3040";"1742";"1";"1742";"1742";"156";"294";"103";"133";"2"
"4";"4";"7043";"45";"3670";"3055";"1734";"1";"1734";"1734";"155";"294";"103";"133";"2"
"4";"4";"7043";"46";"3670";"3033";"1741";"1";"1741";"1741";"155";"293";"103";"133";"2"
"4";"4";"7043";"47";"3673";"3049";"1758";"1";"1758";"1758";"156";"294";"102";"133";"2"
"4";"4";"7043";"48";"3703";"3080";"1763";"1";"1763";"1763";"156";"294";"103";"133";"2"
"4";"4";"7043";"49";"3658";"3034";"1752";"1";"1752";"1752";"156";"294";"103";"133";"2"
"4";"4";"7043";"50";"3631";"3038";"1760";"1";"1760";"1760";"156";"294";"102";"133";"2"

... later ... the last rows ...

"4";"4";"7043";"477";"5003";"4013";"1617";"1";"1617";"1617";"156";"286";"102";"133";"2"
"4";"4";"7043";"478";"4986";"3962";"1655";"1";"1655";"1655";"156";"294";"102";"133";"2"
"4";"4";"7043";"479";"4967";"3958";"1615";"1";"1615";"1615";"156";"286";"102";"133";"2"
"4";"4";"7043";"480";"4930";"3933";"1657";"1";"1657";"1657";"156";"294";"102";"133";"2"
"4";"4";"7043";"481";"4731";"3641";"1558";"1";"1558";"1558";"157";"288";"102";"133";"2"
"4";"4";"7043";"482";"4895";"3845";"1653";"1";"1653";"1653";"156";"294";"102";"133";"2"
"4";"4";"7043";"483";"4876";"3868";"1653";"1";"1653";"1653";"156";"294";"102";"133";"2"
"4";"4";"7043";"484";"4917";"3882";"1658";"1";"1658";"1658";"156";"294";"102";"133";"2"
"4";"4";"7043";"485";"4917";"3875";"1644";"1";"1644";"1644";"156";"294";"102";"133";"2"
"4";"4";"7043";"486";"4899";"3832";"1647";"1";"1647";"1647";"156";"294";"103";"133";"2"
"4";"4";"7043";"487";"4904";"3853";"1645";"1";"1645";"1645";"156";"294";"102";"133";"2"
"4";"4";"7043";"488";"4901";"3840";"1648";"1";"1648";"1648";"156";"294";"102";"133";"2"
"4";"4";"7043";"489";"4724";"3511";"1548";"1";"1548";"1548";"156";"286";"102";"133";"2"
"4";"4";"7043";"490";"4889";"3832";"1630";"1";"1630";"1630";"156";"286";"102";"133";"2"
"4";"4";"7043";"491";"4934";"3826";"1675";"1";"1675";"1675";"156";"294";"102";"133";"2"
"4";"4";"7043";"492";"4885";"3670";"1552";"1";"1552";"1552";"156";"285";"102";"133";"2"
        

I have checked the ZM_BLEND_ALARMED_IMAGES option as you recommended; I'll see if this helps over the next 24 hours.

Update : seems to be working

Posted: Mon Oct 11, 2004 12:17 pm
by awebsurfer
It would appear the blend alarmed images checkbox is precisely what was needed to work around this issue.

Thanks for your help!