From 03796df14d4b61ef092e5a1957f9a1be8509e790 Mon Sep 17 00:00:00 2001 From: stan Date: Thu, 27 Mar 2003 09:31:13 +0000 Subject: [PATCH] Added blend alarmed images feature. git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@432 e3e1d417-86f3-4887-817a-d78f3d33393f --- src/zm_config.h.z | 1 + src/zm_monitor.cpp | 8 ++++++-- zmconfig.pl.in | 7 +++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/zm_config.h.z b/src/zm_config.h.z index c0c6969e5..c6119c44d 100644 --- a/src/zm_config.h.z +++ b/src/zm_config.h.z @@ -41,3 +41,4 @@ #define ZM_STRICT_VIDEO_CONFIG // Whether to allow errors in setting video config to be fatal #define ZM_OPT_LOCAL_BGR_INVERT // Invert BGR colours to RGB +#define ZM_BLEND_ALARM_IMAGES // Whether alarmed images are blended to update the reference image diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index ccbdefaf7..b27e48e5e 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -499,8 +499,12 @@ bool Monitor::Analyse() } } } - ref_image.Blend( *image, ref_blend_perc ); - //DumpImage( image ); + + if ( ZM_BLEND_ALARMED_IMAGES || state != ALARM ) + { + ref_image.Blend( *image, ref_blend_perc ); + //DumpImage( image ); + } shared_images->last_read_index = index%image_buffer_count; image_count++; diff --git a/zmconfig.pl.in b/zmconfig.pl.in index ffedebf29..6e7745c72 100755 --- a/zmconfig.pl.in +++ b/zmconfig.pl.in @@ -219,6 +219,13 @@ my @options = help => "Some cameras or video cards capture images in BGR (Blue-Green-Red) order even when the paletter says RGB. If you see strange colours casts on your images then it may be worth trying this option to see if that corrects the issue. Note this option will apply only to local cameras and not those over a network.", type => $types{boolean}, }, + { + name => "ZM_OPT_BLEND_ALARMED_IMAGES", + default => "yes", + description => "Whether alarmed images are blended to update the reference image ", + help => "To detect alarms ZoneMinder compares an image with a reference image which is formed from a composite of the previous images. This option determines whether images that cause events are included in this process. Doing so may increase the precision of the alarmed region but can cause problems if wholescale lighting changes cause alarms as this would not get fed back into the image.", + type => $types{boolean}, + }, { name => "ZM_OPT_REMOTE_CAMERAS", default => "no",