Send Motion-user mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/motion-user
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Motion-user digest..."
Today's Topics:
1. Compile Time Option (Rainer Dorsch)
----------------------------------------------------------------------
Message: 1
Date: Sun, 15 Mar 2020 12:26:01 +0100
From: Rainer Dorsch <[email protected]>
To: [email protected]
Subject: [Motion-user] Compile Time Option
Message-ID: <4648858.dSlb33O3TG@h370>
Content-Type: text/plain; charset="us-ascii"
Hi,
I am wondering, why alg_noise_tune has a compile time option (last line):
void alg_noise_tune(struct context *cnt, unsigned char *new)
{
struct images *imgs = &cnt->imgs;
int i;
unsigned char *ref = imgs->ref;
int diff, sum = 0, count = 0;
unsigned char *mask = imgs->mask;
unsigned char *smartmask = imgs->smartmask_final;
i = imgs->motionsize;
for (; i > 0; i--) {
diff = ABS(*ref - *new);
if (mask)
diff = ((diff * *mask++) / 255);
if (*smartmask) {
sum += diff + 1;
count++;
}
ref++;
new++;
smartmask++;
}
if (count > 3) /* Avoid divide by zero. */
sum /= count / 3;
/* 5: safe, 4: regular, 3: more sensitive */
cnt->noise = 4 + (cnt->noise + sum) / 2;
}
Doesn't make it sense to have that in motion.conf or camera.conf?
Thanks
Rainer
--
Rainer Dorsch
http://bokomoko.de/
------------------------------
------------------------------
Subject: Digest Footer
_______________________________________________
Motion-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/motion-user
------------------------------
End of Motion-user Digest, Vol 165, Issue 11
********************************************