Add was_alarmed property and WasAlarmed method to Zone
This commit is contained in:
parent
22b73c1610
commit
2c1a02ade6
|
@ -51,6 +51,7 @@ void Zone::Setup( Monitor *p_monitor, int p_id, const char *p_label, ZoneType p_
|
||||||
Debug( 1, "Initialised zone %d/%s - %d - %dx%d - Rgb:%06x, CM:%d, MnAT:%d, MxAT:%d, MnAP:%d, MxAP:%d, FB:%dx%d, MnFP:%d, MxFP:%d, MnBS:%d, MxBS:%d, MnB:%d, MxB:%d, OF: %d, AF: %d", id, label, type, polygon.Width(), polygon.Height(), alarm_rgb, check_method, min_pixel_threshold, max_pixel_threshold, min_alarm_pixels, max_alarm_pixels, filter_box.X(), filter_box.Y(), min_filter_pixels, max_filter_pixels, min_blob_pixels, max_blob_pixels, min_blobs, max_blobs, overload_frames, extend_alarm_frames );
|
Debug( 1, "Initialised zone %d/%s - %d - %dx%d - Rgb:%06x, CM:%d, MnAT:%d, MxAT:%d, MnAP:%d, MxAP:%d, FB:%dx%d, MnFP:%d, MxFP:%d, MnBS:%d, MxBS:%d, MnB:%d, MxB:%d, OF: %d, AF: %d", id, label, type, polygon.Width(), polygon.Height(), alarm_rgb, check_method, min_pixel_threshold, max_pixel_threshold, min_alarm_pixels, max_alarm_pixels, filter_box.X(), filter_box.Y(), min_filter_pixels, max_filter_pixels, min_blob_pixels, max_blob_pixels, min_blobs, max_blobs, overload_frames, extend_alarm_frames );
|
||||||
|
|
||||||
alarmed = false;
|
alarmed = false;
|
||||||
|
was_alarmed = false;
|
||||||
pixel_diff = 0;
|
pixel_diff = 0;
|
||||||
alarm_pixels = 0;
|
alarm_pixels = 0;
|
||||||
alarm_filter_pixels = 0;
|
alarm_filter_pixels = 0;
|
||||||
|
|
|
@ -126,14 +126,16 @@ public:
|
||||||
inline const Image *AlarmImage() const { return( image ); }
|
inline const Image *AlarmImage() const { return( image ); }
|
||||||
inline const Polygon &GetPolygon() const { return( polygon ); }
|
inline const Polygon &GetPolygon() const { return( polygon ); }
|
||||||
inline bool Alarmed() const { return( alarmed ); }
|
inline bool Alarmed() const { return( alarmed ); }
|
||||||
inline void SetAlarm() { alarmed = true; }
|
inline bool WasAlarmed() const { return( was_alarmed ); }
|
||||||
inline void ClearAlarm() { alarmed = false; }
|
inline void SetAlarm() { was_alarmed = alarmed; alarmed = true; }
|
||||||
|
inline void ClearAlarm() { was_alarmed = alarmed; alarmed = false; }
|
||||||
inline Coord GetAlarmCentre() const { return( alarm_centre ); }
|
inline Coord GetAlarmCentre() const { return( alarm_centre ); }
|
||||||
inline unsigned int Score() const { return( score ); }
|
inline unsigned int Score() const { return( score ); }
|
||||||
|
|
||||||
inline void ResetStats()
|
inline void ResetStats()
|
||||||
{
|
{
|
||||||
alarmed = false;
|
alarmed = false;
|
||||||
|
was_alarmed = false;
|
||||||
pixel_diff = 0;
|
pixel_diff = 0;
|
||||||
alarm_pixels = 0;
|
alarm_pixels = 0;
|
||||||
alarm_filter_pixels = 0;
|
alarm_filter_pixels = 0;
|
||||||
|
|
Loading…
Reference in New Issue