diff --git a/src/zm.cpp b/src/zm.cpp index 95eab3b18..d2bf75931 100644 --- a/src/zm.cpp +++ b/src/zm.cpp @@ -1766,7 +1766,7 @@ bool Monitor::Analyse() } } } - ref_image.Blend( *image, 10 ); + ref_image.Blend( *image, BLEND_PERC ); DumpImage( image ); shared_images->last_read_index = index%IMAGE_BUFFER_COUNT; diff --git a/src/zm.h b/src/zm.h index 112a4828c..e446d7012 100644 --- a/src/zm.h +++ b/src/zm.h @@ -524,6 +524,7 @@ public: class Monitor : public Camera { protected: +#if 0 typedef enum { WARMUP_COUNT=25, @@ -532,6 +533,7 @@ protected: IMAGE_BUFFER_COUNT=100, FPS_REPORT_INTERVAL=200, }; +#endif typedef enum { NONE=1, diff --git a/src/zmcfg.h.z b/src/zmcfg.h.z index 4c0704d62..e0912106a 100644 --- a/src/zmcfg.h.z +++ b/src/zmcfg.h.z @@ -19,10 +19,16 @@ #include "config.h" -#define ZM_DATABASE "zm" -#define ZM_DB_USERA "zmadmin" -#define ZM_DB_PASSA "zmadminzm" -#define ZM_DB_USERB "zmuser" -#define ZM_DB_PASSB "zmuserzm" +#define ZM_DATABASE "zm" // Database name +#define ZM_DB_USERA "zmadmin" // Privileged DB user name, needs at least select, insert, delete privileges +#define ZM_DB_PASSA "zmadminzm" // Privileged DB user password +#define ZM_DB_USERB "zmuser" // Unprivileged DB user name, need just select privilege. +#define ZM_DB_PASSB "zmuserzm" // Unprivileged DB user password -#define EVENT_DIR "events" +#define EVENT_DIR "events" // Event directory relative to web directory +#define BLEND_PERC 10 // Percentage of new image going into reference image. +#define WARMUP_COUNT 25 // How many images to process before looking for events +#define PRE_EVENT_COUNT 10 // How many images to hold and prepend to an alarm event +#define POST_EVENT_COUNT 10 // How many unalarmed images must occur before the alarm state is reset +#define IMAGE_BUFFER_COUNT 100 // Size of circular image buffer, should be at least twice the size of the pre_event_count +#define FPS_REPORT_INTERVAL 200 // How many images should be captured/processed before reporting the current FPS