billw wrote:Is your confirm gap > 0? If so, for objects in frame for ~ 1 sec a zero confirm gap might help.

If you can post some "pikrellcam -vm" output for some missed events it would help to

figure out why they were missed. If you need to, ^C out of the program when an event happens

so the output is stopped.

With confirm gap = 0, the pi (very occasionally) misses a large motion event. Below is an example from pikrellcam -vm of such an event at 07:44:25 today. From this debug info, it looks to me like the object was detected in five separate frames, but rejected as a valid motion in each case for some reason. In this case the subject is a dark blue car that passes from left to right , mostly filling the entire frame because this camera has a telephoto lens with 10 degree horizontal angle of view, and is set close to the road. I understand that currently, left to right motion (increasing x coordinate) shows as negative (dx) values. Here, in some regions I see a positive (dx) value; not sure why that would be. The camera is at roughly a 45 degree angle to the road, so geometric perspective causes the motion vectors at different (x,y) locations in the frame to point in somewhat different directions, is that a problem? Is it not valid motion when (for each detection region) the "reject" value is larger than the "count" value? What drives the "reject" count?

Code: Select all

```
cvec[0]: x,y(14,32) dx,dy(-52,3) mag2,count(2713,149) reject:231 box:18x18
in_box[count:78 rej:51] motion:0 vetical:0 sparkle:2 limit_count:40
cvec[1]: x,y(30,27) dx,dy(-59,-38) mag2,count(4925,127) reject:542 box:16x16
in_box[count:55 rej:218] motion:0 vetical:0 sparkle:1 limit_count:40
cvec[2]: x,y(50,28) dx,dy(11,-44) mag2,count(2057,121) reject:482 box:16x16
in_box[count:51 rej:157] motion:0 vetical:0 sparkle:0 limit_count:40
cvec[3]: x,y(69,31) dx,dy(51,-4) mag2,count(2617,169) reject:376 box:18x20
in_box[count:107 rej:191] motion:0 vetical:0 sparkle:0 limit_count:40
any:2200 reject:1631 sparkle:3 sparkle_expma:0.1
07:44:25 motion count:0 fail:4 window:0
cvec[0]: x,y(10,33) dx,dy(-61,23) mag2,count(4250,97) reject:536 box:14x14
in_box[count:47 rej:172] motion:0 vetical:0 sparkle:0 limit_count:40
cvec[1]: x,y(30,21) dx,dy(-42,-39) mag2,count(3285,65) reject:571 box:12x12
in_box[count:32 rej:91] motion:0 vetical:0 sparkle:0 limit_count:40
cvec[2]: x,y(49,25) dx,dy(-56,-12) mag2,count(3280,95) reject:399 box:14x14
in_box[count:22 rej:137] motion:0 vetical:0 sparkle:2 limit_count:40
cvec[3]: x,y(67,31) dx,dy(-62,-27) mag2,count(4573,177) reject:383 box:18x20
in_box[count:132 rej:235] motion:2 vetical:0 sparkle:1 limit_count:40
any:2326 reject:1889 sparkle:3 sparkle_expma:0.1
07:44:25 motion count:1 fail:3 window:0
cvec[0]: x,y(11,30) dx,dy(-62,-2) mag2,count(3848,179) reject:477 box:18x20
in_box[count:125 rej:227] motion:0 vetical:0 sparkle:0 limit_count:40
cvec[1]: x,y(32,28) dx,dy(-61,-8) mag2,count(3785,168) reject:494 box:18x20
in_box[count:66 rej:264] motion:0 vetical:0 sparkle:0 limit_count:40
cvec[2]: x,y(48,28) dx,dy(-58,-7) mag2,count(3413,160) reject:509 box:18x18
in_box[count:94 rej:259] motion:0 vetical:0 sparkle:1 limit_count:40
cvec[3]: x,y(68,30) dx,dy(4,-44) mag2,count(1952,64) reject:417 box:12x12
in_box[count:29 rej:101] motion:0 vetical:1 sparkle:1 limit_count:40
any:2470 reject:1897 sparkle:2 sparkle_expma:0.1
07:44:25 motion count:0 fail:4 window:0
cvec[0]: x,y(10,35) dx,dy(53,13) mag2,count(2978,145) reject:223 box:18x18
in_box[count:65 rej:72] motion:0 vetical:0 sparkle:3 limit_count:40
cvec[2]: x,y(49,32) dx,dy(-59,10) mag2,count(3581,142) reject:359 box:16x18
in_box[count:62 rej:129] motion:0 vetical:0 sparkle:2 limit_count:40
cvec[3]: x,y(68,31) dx,dy(-60,-3) mag2,count(3609,183) reject:329 box:20x20
in_box[count:100 rej:257] motion:0 vetical:0 sparkle:1 limit_count:40
any:1906 reject:1399 sparkle:7 sparkle_expma:0.2
07:44:25 motion count:0 fail:3 window:0
cvec[0]: x,y(11,34) dx,dy(50,29) mag2,count(3341,109) reject:363 box:14x16
in_box[count:43 rej:96] motion:0 vetical:0 sparkle:3 limit_count:40
cvec[1]: x,y(29,33) dx,dy(53,1) mag2,count(2810,164) reject:385 box:18x20
in_box[count:77 rej:165] motion:0 vetical:0 sparkle:1 limit_count:40
cvec[2]: x,y(51,30) dx,dy(-50,-1) mag2,count(2501,161) reject:422 box:18x18
in_box[count:89 rej:139] motion:0 vetical:0 sparkle:2 limit_count:40
cvec[3]: x,y(68,32) dx,dy(-57,-7) mag2,count(3298,148) reject:386 box:18x18
in_box[count:107 rej:184] motion:2 vetical:0 sparkle:1 limit_count:40
any:2145 reject:1556 sparkle:7 sparkle_expma:0.3
07:44:25 motion count:1 fail:3 window:0
```

Here is debug data from another missed event at 12:24:04 where the motion counts are big, but the reject count is higher

Code: Select all

```
cvec[1]: x,y(30,24) dx,dy(-38,49) mag2,count(3845,44) reject:579 box:10x10
in_box[count:14 rej:91] motion:0 vetical:0 sparkle:1 limit_count:40
cvec[2]: x,y(48,31) dx,dy(-59,0) mag2,count(3481,203) reject:464 box:20x22
in_box[count:114 rej:291] motion:0 vetical:0 sparkle:0 limit_count:40
cvec[3]: x,y(68,34) dx,dy(-67,2) mag2,count(4493,179) reject:440 box:18x20
in_box[count:92 rej:263] motion:0 vetical:0 sparkle:0 limit_count:40
any:2440 reject:1985 sparkle:1 sparkle_expma:0.1
12:24:04 motion count:0 fail:3 window:0
cvec[0]: x,y(14,30) dx,dy(-57,-5) mag2,count(3274,139) reject:248 box:16x18
in_box[count:77 rej:108] motion:0 vetical:0 sparkle:1 limit_count:40
cvec[1]: x,y(30,27) dx,dy(-54,-49) mag2,count(5317,61) reject:497 box:12x12
in_box[count:7 rej:123] motion:0 vetical:0 sparkle:5 limit_count:40
cvec[2]: x,y(46,30) dx,dy(-64,40) mag2,count(5696,91) reject:314 box:14x14
in_box[count:27 rej:156] motion:0 vetical:0 sparkle:4 limit_count:40
cvec[3]: x,y(68,32) dx,dy(-54,0) mag2,count(2916,97) reject:169 box:14x14
in_box[count:38 rej:78] motion:0 vetical:0 sparkle:10 limit_count:40
any:1636 reject:1228 sparkle:20 sparkle_expma:0.3
12:24:04 motion count:0 fail:4 window:0
cvec[0]: x,y(14,23) dx,dy(-51,-17) mag2,count(2890,59) reject:147 box:10x12
in_box[count:32 rej:86] motion:0 vetical:0 sparkle:6 limit_count:40
cvec[1]: x,y(29,25) dx,dy(-58,-11) mag2,count(3485,133) reject:357 box:16x18
in_box[count:72 rej:166] motion:0 vetical:0 sparkle:0 limit_count:40
cvec[2]: x,y(50,28) dx,dy(-62,-3) mag2,count(3853,145) reject:434 box:18x18
in_box[count:53 rej:205] motion:0 vetical:0 sparkle:0 limit_count:40
cvec[3]: x,y(72,33) dx,dy(-54,0) mag2,count(2916,134) reject:275 box:16x18
in_box[count:81 rej:80] motion:0 vetical:0 sparkle:1 limit_count:40
any:1691 reject:1213 sparkle:7 sparkle_expma:0.3
12:24:04 motion count:0 fail:4 window:0
cvec[3]: x,y(67,25) dx,dy(-55,-8) mag2,count(3089,138) reject:196 box:16x18
in_box[count:95 rej:149] motion:0 vetical:0 sparkle:0 limit_count:40
any:357 reject:196 sparkle:4 sparkle_expma:0.4
12:24:04 motion count:0 fail:1 window:0
```