mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-26 19:06:11 +01:00
Use cv2.bitwise_and instead of numpy.where
This commit is contained in:
parent
a1cc9ad1f0
commit
3e9b3711dc
@ -48,7 +48,7 @@ class MotionDetector():
|
|||||||
|
|
||||||
# black out everything in the avg_delta where there isnt motion in the current frame
|
# black out everything in the avg_delta where there isnt motion in the current frame
|
||||||
avg_delta_image = cv2.convertScaleAbs(self.avg_delta)
|
avg_delta_image = cv2.convertScaleAbs(self.avg_delta)
|
||||||
avg_delta_image[np.where(current_thresh==[0])] = [0]
|
avg_delta_image = cv2.bitwise_and(avg_delta_image, current_thresh)
|
||||||
|
|
||||||
# then look for deltas above the threshold, but only in areas where there is a delta
|
# then look for deltas above the threshold, but only in areas where there is a delta
|
||||||
# in the current frame. this prevents deltas from previous frames from being included
|
# in the current frame. this prevents deltas from previous frames from being included
|
||||||
|
Loading…
Reference in New Issue
Block a user