store event stats regardless of savejpegs or image availability
This commit is contained in:
parent
7c70c26fbd
commit
8ca93d2f0b
|
@ -2205,11 +2205,9 @@ bool Monitor::Analyse() {
|
||||||
//have_pre_alarmed_frames ++;
|
//have_pre_alarmed_frames ++;
|
||||||
Event::AddPreAlarmFrame(snap->image, *timestamp, score, nullptr);
|
Event::AddPreAlarmFrame(snap->image, *timestamp, score, nullptr);
|
||||||
} else if (state == ALARM) {
|
} else if (state == ALARM) {
|
||||||
if ((savejpegs > 1 ) and snap->image) {
|
|
||||||
|
|
||||||
for (Zone zone : zones) {
|
for (Zone zone : zones) {
|
||||||
if (zone.Alarmed()) {
|
if (zone.Alarmed()) {
|
||||||
if (zone.AlarmImage()) {
|
if (zone.AlarmImage() and (savejpegs > 1) and snap->image) {
|
||||||
if (!snap->analysis_image)
|
if (!snap->analysis_image)
|
||||||
snap->analysis_image = new Image(*(snap->image));
|
snap->analysis_image = new Image(*(snap->image));
|
||||||
snap->analysis_image->Overlay(*(zone.AlarmImage()));
|
snap->analysis_image->Overlay(*(zone.AlarmImage()));
|
||||||
|
@ -2218,7 +2216,6 @@ bool Monitor::Analyse() {
|
||||||
zone.RecordStats(event);
|
zone.RecordStats(event);
|
||||||
} // end if zone is alarmed
|
} // end if zone is alarmed
|
||||||
} // end foreach zone
|
} // end foreach zone
|
||||||
}
|
|
||||||
if (event) {
|
if (event) {
|
||||||
if (noteSetMap.size() > 0)
|
if (noteSetMap.size() > 0)
|
||||||
event->updateNotes(noteSetMap);
|
event->updateNotes(noteSetMap);
|
||||||
|
|
Loading…
Reference in New Issue