diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 5867762..9fafd9b 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -104,58 +104,66 @@
+
+
+
+
-
+
-
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
\ No newline at end of file
diff --git a/recordings/output.avi b/recordings/output.avi
index b7aa69a..5541368 100644
Binary files a/recordings/output.avi and b/recordings/output.avi differ
diff --git a/settings.zip b/settings.zip
new file mode 100644
index 0000000..6448764
Binary files /dev/null and b/settings.zip differ
diff --git a/smart_intercom.py b/smart_intercom.py
index a7361c6..b9dd548 100644
--- a/smart_intercom.py
+++ b/smart_intercom.py
@@ -5,7 +5,7 @@ import numpy as np
from pygame import mixer
-count = 0
+
def display(length):
@@ -28,6 +28,7 @@ def display(length):
+
def alert():
mixer.init()
alert = mixer.Sound('src/noises/beep-07.wav')
@@ -70,9 +71,7 @@ def click_event2(event, x, y, flags, param):
if event == cv2.EVENT_LBUTTONDOWN:
global displayString
- if len(displayString) == 4:
- print('zero')
- displayString = ""
+
if 348 <= y <= 370 and 59 <= x <= 86:
print("1 outdoor")
@@ -126,13 +125,40 @@ def click_event2(event, x, y, flags, param):
displayString = displayString + '#'
print(displayString)
+
display(len(displayString))
+def display(length):
+ global displayString
+ global count
+ if length == 1:
+ onestar = cv2.imread('src/images/*.png')
+ outDoor[220:304, 54:214] = onestar
+ elif length == 2:
+ twostar = cv2.imread('src/images/**.png')
+ outDoor[220:304, 54:214] = twostar
+ elif length == 3:
+ threestar = cv2.imread('src/images/***.png')
+ outDoor[220:304, 54:214] = threestar
+ elif length == 4:
+ if displayString == "1234":
+ print("dobre haslo")
+ goodpass = cv2.imread('src/images/goodpass.png')
+ outDoor[220:304, 54:214] = goodpass
+ count = count + 1
+ if count == 20:
+ displayString = displayString + '#'
+ else:
+ badpass = cv2.imread('src/images/badpass.png')
+ outDoor[220:304, 54:214] = badpass
+
+ elif length == 5:
+ displayString = ''
def notification():
not1 = cv2.imread('src/notification/not1.png')
@@ -147,13 +173,15 @@ def notification():
global a
a = None
+global count
+count = 0
global displayString
displayString =""
i = 0
cam_status = 1
liczba = 0
globalna = 0
-displayString3 = "jud"
+
cap = cv2.VideoCapture(0)
four_cc = cv2.VideoWriter_fourcc(*'XVID')
out = cv2.VideoWriter('recordings/output.avi', four_cc, 10.0, (1280, 720))
diff --git a/src/images/badpass.png b/src/images/badpass.png
new file mode 100644
index 0000000..1310cb4
Binary files /dev/null and b/src/images/badpass.png differ
diff --git a/src/images/goodpass.png b/src/images/goodpass.png
new file mode 100644
index 0000000..7f4dc2d
Binary files /dev/null and b/src/images/goodpass.png differ