spacing, remove extra parenthesis
parent
8742388acd
commit
90eda0b88b
|
@ -236,7 +236,9 @@ bool Zone::CheckAlarms(const Image *delta_image) {
|
|||
|
||||
if ( pixel_diff_count && alarm_pixels )
|
||||
pixel_diff = pixel_diff_count/alarm_pixels;
|
||||
Debug(5, "Got %d alarmed pixels, need %d -> %d, avg pixel diff %d", alarm_pixels, min_alarm_pixels, max_alarm_pixels, pixel_diff);
|
||||
|
||||
Debug(5, "Got %d alarmed pixels, need %d -> %d, avg pixel diff %d",
|
||||
alarm_pixels, min_alarm_pixels, max_alarm_pixels, pixel_diff);
|
||||
|
||||
if ( alarm_pixels ) {
|
||||
if ( min_alarm_pixels && (alarm_pixels < (unsigned int)min_alarm_pixels) ) {
|
||||
|
@ -312,7 +314,8 @@ bool Zone::CheckAlarms(const Image *delta_image) {
|
|||
if ( config.record_diag_images )
|
||||
diff_image->WriteJpeg(diag_path);
|
||||
|
||||
Debug(5, "Got %d filtered pixels, need %d -> %d", alarm_filter_pixels, min_filter_pixels, max_filter_pixels);
|
||||
Debug(5, "Got %d filtered pixels, need %d -> %d",
|
||||
alarm_filter_pixels, min_filter_pixels, max_filter_pixels);
|
||||
|
||||
if ( alarm_filter_pixels ) {
|
||||
if ( min_filter_pixels && (alarm_filter_pixels < min_filter_pixels) ) {
|
||||
|
@ -328,7 +331,7 @@ bool Zone::CheckAlarms(const Image *delta_image) {
|
|||
return false;
|
||||
}
|
||||
|
||||
score = (100*alarm_filter_pixels)/(polygon.Area());
|
||||
score = (100*alarm_filter_pixels)/polygon.Area();
|
||||
if ( score < 1 )
|
||||
score = 1; /* Fix for score of 0 when frame meets thresholds but alarmed area is not big enough */
|
||||
Debug(5, "Current score is %d", score);
|
||||
|
@ -438,7 +441,8 @@ bool Zone::CheckAlarms(const Image *delta_image) {
|
|||
|
||||
alarm_blobs--;
|
||||
|
||||
Debug(6, "Merging blob %d with %d at %d,%d, %d current blobs", bss->tag, bsm->tag, x, y, alarm_blobs);
|
||||
Debug(6, "Merging blob %d with %d at %d,%d, %d current blobs",
|
||||
bss->tag, bsm->tag, x, y, alarm_blobs);
|
||||
|
||||
// Clear out the old blob
|
||||
bss->tag = 0;
|
||||
|
@ -476,7 +480,11 @@ bool Zone::CheckAlarms(const Image *delta_image) {
|
|||
BlobStats *bs = &blob_stats[i];
|
||||
// See if we can recycle one first, only if it's at least two rows up
|
||||
if ( bs->count && bs->hi_y < (int)(y-1) ) {
|
||||
if ( (min_blob_pixels && bs->count < min_blob_pixels) || (max_blob_pixels && bs->count > max_blob_pixels) ) {
|
||||
if (
|
||||
(min_blob_pixels && bs->count < min_blob_pixels)
|
||||
||
|
||||
(max_blob_pixels && bs->count > max_blob_pixels)
|
||||
) {
|
||||
if ( config.create_analysis_images || config.record_diag_images ) {
|
||||
for ( int sy = bs->lo_y; sy <= bs->hi_y; sy++ ) {
|
||||
spdiff = diff_buff + ((diff_width * sy) + bs->lo_x);
|
||||
|
|
Loading…
Reference in New Issue