Update motion_detector.py

This commit is contained in:
Patrice Matz 2020-01-02 23:23:03 +01:00 committed by GitHub
parent 6b374aa5bd
commit 30ffeb788f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 15 deletions

View File

@ -12,20 +12,6 @@ import cv2
import com import com
import config 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(): def compare():
try: try:
url = config.stream url = config.stream
@ -120,4 +106,4 @@ def compare():
def retry(error): def retry(error):
print(error) print(error)
time.sleep(10) time.sleep(10)
compare() compare()