mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
scripts/examples: Fix triggering in frame differencing examples.
This commit is contained in:
parent
25359054e7
commit
953104284a
@ -44,7 +44,7 @@ while True:
|
||||
img = sensor.snapshot() # Take a picture and return the image.
|
||||
|
||||
frame_count += 1
|
||||
if frame_count > BG_UPDATE_FRAMES:
|
||||
if frame_count > BG_UPDATE_FRAMES and not triggered:
|
||||
frame_count = 0
|
||||
# Blend in new frame. We're doing 256-alpha here because we want to
|
||||
# blend the new frame into the background. Not the background into the
|
||||
|
||||
@ -42,7 +42,7 @@ while True:
|
||||
img = sensor.snapshot() # Take a picture and return the image.
|
||||
|
||||
frame_count += 1
|
||||
if frame_count > BG_UPDATE_FRAMES:
|
||||
if frame_count > BG_UPDATE_FRAMES and not triggered:
|
||||
frame_count = 0
|
||||
# Blend in new frame. We're doing 256-alpha here because we want to
|
||||
# blend the new frame into the background. Not the background into the
|
||||
|
||||
Loading…
Reference in New Issue
Block a user