mirror of https://github.com/Askill/SurvBot.git
Update motion_detector.py
This commit is contained in:
parent
6b374aa5bd
commit
30ffeb788f
|
|
@ -12,20 +12,6 @@ import cv2
|
|||
import com
|
||||
import config
|
||||
|
||||
|
||||
def increase_brightness(img, value=30):
|
||||
hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)
|
||||
h, s, v = cv2.split(hsv)
|
||||
|
||||
lim = 255 - value
|
||||
v[v > lim] = 255
|
||||
v[v <= lim] += value
|
||||
|
||||
final_hsv = cv2.merge((h, s, v))
|
||||
img = cv2.cvtColor(final_hsv, cv2.COLOR_HSV2BGR)
|
||||
|
||||
return img
|
||||
|
||||
def compare():
|
||||
try:
|
||||
url = config.stream
|
||||
|
|
@ -120,4 +106,4 @@ def compare():
|
|||
def retry(error):
|
||||
print(error)
|
||||
time.sleep(10)
|
||||
compare()
|
||||
compare()
|
||||
|
|
|
|||
Loading…
Reference in New Issue