add new features

This commit is contained in:
s449273 2020-01-09 21:02:51 +01:00
parent 30bdca6f0d
commit 0c62afdbe1
6 changed files with 59 additions and 23 deletions

View File

@ -104,58 +104,66 @@
<screen x="53" y="27" width="3787" height="1053" /> <screen x="53" y="27" width="3787" height="1053" />
</state> </state>
<state x="444" y="211" key="#com.intellij.execution.impl.EditConfigurationsDialog/53.27.3787.1053@53.27.3787.1053" timestamp="1575643901302" /> <state x="444" y="211" key="#com.intellij.execution.impl.EditConfigurationsDialog/53.27.3787.1053@53.27.3787.1053" timestamp="1575643901302" />
<state x="696" y="364" width="518" height="325" key="#com.intellij.ide.actions.ChooseComponentsToExportDialog" timestamp="1578223710735">
<screen x="0" y="27" width="1920" height="1002" />
</state>
<state x="696" y="364" width="518" height="325" key="#com.intellij.ide.actions.ChooseComponentsToExportDialog/0.27.1920.1002@0.27.1920.1002" timestamp="1578223710735" />
<state x="86" y="123" width="777" height="807" key="CommitChangelistDialog2" timestamp="1577981003041"> <state x="86" y="123" width="777" height="807" key="CommitChangelistDialog2" timestamp="1577981003041">
<screen x="0" y="27" width="1920" height="1002" /> <screen x="0" y="27" width="1920" height="1002" />
</state> </state>
<state x="86" y="123" width="777" height="807" key="CommitChangelistDialog2/0.27.1920.1002@0.27.1920.1002" timestamp="1577981003041" /> <state x="86" y="123" width="777" height="807" key="CommitChangelistDialog2/0.27.1920.1002@0.27.1920.1002" timestamp="1577981003041" />
<state width="937" height="260" key="GridCell.Tab.0.bottom" timestamp="1577980891069"> <state x="737" y="271" width="444" height="513" key="FileChooserDialogImpl" timestamp="1578223708951">
<screen x="0" y="27" width="1920" height="1002" /> <screen x="0" y="27" width="1920" height="1002" />
</state> </state>
<state width="937" height="260" key="GridCell.Tab.0.bottom/0.27.1920.1002@0.27.1920.1002" timestamp="1577980891069" /> <state x="737" y="271" width="444" height="513" key="FileChooserDialogImpl/0.27.1920.1002@0.27.1920.1002" timestamp="1578223708951" />
<state width="1897" height="260" key="GridCell.Tab.0.bottom" timestamp="1578223715864">
<screen x="0" y="27" width="1920" height="1002" />
</state>
<state width="1897" height="260" key="GridCell.Tab.0.bottom/0.27.1920.1002@0.27.1920.1002" timestamp="1578223715864" />
<state width="1377" height="260" key="GridCell.Tab.0.bottom/53.27.1867.1053@53.27.1867.1053" timestamp="1575643274434" /> <state width="1377" height="260" key="GridCell.Tab.0.bottom/53.27.1867.1053@53.27.1867.1053" timestamp="1575643274434" />
<state width="1377" height="260" key="GridCell.Tab.0.bottom/53.27.3787.1053@53.27.3787.1053" timestamp="1575643904844" /> <state width="1377" height="260" key="GridCell.Tab.0.bottom/53.27.3787.1053@53.27.3787.1053" timestamp="1575643904844" />
<state width="937" height="260" key="GridCell.Tab.0.center" timestamp="1577980891068"> <state width="1897" height="260" key="GridCell.Tab.0.center" timestamp="1578223715863">
<screen x="0" y="27" width="1920" height="1002" /> <screen x="0" y="27" width="1920" height="1002" />
</state> </state>
<state width="937" height="260" key="GridCell.Tab.0.center/0.27.1920.1002@0.27.1920.1002" timestamp="1577980891068" /> <state width="1897" height="260" key="GridCell.Tab.0.center/0.27.1920.1002@0.27.1920.1002" timestamp="1578223715863" />
<state width="1377" height="260" key="GridCell.Tab.0.center/53.27.1867.1053@53.27.1867.1053" timestamp="1575643274433" /> <state width="1377" height="260" key="GridCell.Tab.0.center/53.27.1867.1053@53.27.1867.1053" timestamp="1575643274433" />
<state width="1377" height="260" key="GridCell.Tab.0.center/53.27.3787.1053@53.27.3787.1053" timestamp="1575643904844" /> <state width="1377" height="260" key="GridCell.Tab.0.center/53.27.3787.1053@53.27.3787.1053" timestamp="1575643904844" />
<state width="937" height="260" key="GridCell.Tab.0.left" timestamp="1577980891067"> <state width="1897" height="260" key="GridCell.Tab.0.left" timestamp="1578223715863">
<screen x="0" y="27" width="1920" height="1002" /> <screen x="0" y="27" width="1920" height="1002" />
</state> </state>
<state width="937" height="260" key="GridCell.Tab.0.left/0.27.1920.1002@0.27.1920.1002" timestamp="1577980891067" /> <state width="1897" height="260" key="GridCell.Tab.0.left/0.27.1920.1002@0.27.1920.1002" timestamp="1578223715863" />
<state width="1377" height="260" key="GridCell.Tab.0.left/53.27.1867.1053@53.27.1867.1053" timestamp="1575643274433" /> <state width="1377" height="260" key="GridCell.Tab.0.left/53.27.1867.1053@53.27.1867.1053" timestamp="1575643274433" />
<state width="1377" height="260" key="GridCell.Tab.0.left/53.27.3787.1053@53.27.3787.1053" timestamp="1575643904843" /> <state width="1377" height="260" key="GridCell.Tab.0.left/53.27.3787.1053@53.27.3787.1053" timestamp="1575643904843" />
<state width="937" height="260" key="GridCell.Tab.0.right" timestamp="1577980891069"> <state width="1897" height="260" key="GridCell.Tab.0.right" timestamp="1578223715863">
<screen x="0" y="27" width="1920" height="1002" /> <screen x="0" y="27" width="1920" height="1002" />
</state> </state>
<state width="937" height="260" key="GridCell.Tab.0.right/0.27.1920.1002@0.27.1920.1002" timestamp="1577980891069" /> <state width="1897" height="260" key="GridCell.Tab.0.right/0.27.1920.1002@0.27.1920.1002" timestamp="1578223715863" />
<state width="1377" height="260" key="GridCell.Tab.0.right/53.27.1867.1053@53.27.1867.1053" timestamp="1575643274433" /> <state width="1377" height="260" key="GridCell.Tab.0.right/53.27.1867.1053@53.27.1867.1053" timestamp="1575643274433" />
<state width="1377" height="260" key="GridCell.Tab.0.right/53.27.3787.1053@53.27.3787.1053" timestamp="1575643904844" /> <state width="1377" height="260" key="GridCell.Tab.0.right/53.27.3787.1053@53.27.3787.1053" timestamp="1575643904844" />
<state width="1897" height="323" key="GridCell.Tab.1.bottom" timestamp="1577976694302"> <state width="1897" height="323" key="GridCell.Tab.1.bottom" timestamp="1577981221311">
<screen x="0" y="27" width="1920" height="1002" /> <screen x="0" y="27" width="1920" height="1002" />
</state> </state>
<state width="1897" height="323" key="GridCell.Tab.1.bottom/0.27.1920.1002@0.27.1920.1002" timestamp="1577976694302" /> <state width="1897" height="323" key="GridCell.Tab.1.bottom/0.27.1920.1002@0.27.1920.1002" timestamp="1577981221311" />
<state width="1377" height="322" key="GridCell.Tab.1.bottom/53.27.3787.1053@53.27.3787.1053" timestamp="1575643647121" /> <state width="1377" height="322" key="GridCell.Tab.1.bottom/53.27.3787.1053@53.27.3787.1053" timestamp="1575643647121" />
<state width="1897" height="323" key="GridCell.Tab.1.center" timestamp="1577976694301"> <state width="1897" height="323" key="GridCell.Tab.1.center" timestamp="1577981221311">
<screen x="0" y="27" width="1920" height="1002" /> <screen x="0" y="27" width="1920" height="1002" />
</state> </state>
<state width="1897" height="323" key="GridCell.Tab.1.center/0.27.1920.1002@0.27.1920.1002" timestamp="1577976694301" /> <state width="1897" height="323" key="GridCell.Tab.1.center/0.27.1920.1002@0.27.1920.1002" timestamp="1577981221311" />
<state width="1377" height="322" key="GridCell.Tab.1.center/53.27.3787.1053@53.27.3787.1053" timestamp="1575643647120" /> <state width="1377" height="322" key="GridCell.Tab.1.center/53.27.3787.1053@53.27.3787.1053" timestamp="1575643647120" />
<state width="1897" height="323" key="GridCell.Tab.1.left" timestamp="1577976694301"> <state width="1897" height="323" key="GridCell.Tab.1.left" timestamp="1577981221310">
<screen x="0" y="27" width="1920" height="1002" /> <screen x="0" y="27" width="1920" height="1002" />
</state> </state>
<state width="1897" height="323" key="GridCell.Tab.1.left/0.27.1920.1002@0.27.1920.1002" timestamp="1577976694301" /> <state width="1897" height="323" key="GridCell.Tab.1.left/0.27.1920.1002@0.27.1920.1002" timestamp="1577981221310" />
<state width="1377" height="322" key="GridCell.Tab.1.left/53.27.3787.1053@53.27.3787.1053" timestamp="1575643647120" /> <state width="1377" height="322" key="GridCell.Tab.1.left/53.27.3787.1053@53.27.3787.1053" timestamp="1575643647120" />
<state width="1897" height="323" key="GridCell.Tab.1.right" timestamp="1577976694301"> <state width="1897" height="323" key="GridCell.Tab.1.right" timestamp="1577981221311">
<screen x="0" y="27" width="1920" height="1002" /> <screen x="0" y="27" width="1920" height="1002" />
</state> </state>
<state width="1897" height="323" key="GridCell.Tab.1.right/0.27.1920.1002@0.27.1920.1002" timestamp="1577976694301" /> <state width="1897" height="323" key="GridCell.Tab.1.right/0.27.1920.1002@0.27.1920.1002" timestamp="1577981221311" />
<state width="1377" height="322" key="GridCell.Tab.1.right/53.27.3787.1053@53.27.3787.1053" timestamp="1575643647120" /> <state width="1377" height="322" key="GridCell.Tab.1.right/53.27.3787.1053@53.27.3787.1053" timestamp="1575643647120" />
<state x="606" y="363" key="com.intellij.ide.util.TipDialog" timestamp="1577972208242"> <state x="606" y="363" key="com.intellij.ide.util.TipDialog" timestamp="1578223460690">
<screen x="0" y="27" width="1920" height="1002" /> <screen x="0" y="27" width="1920" height="1002" />
</state> </state>
<state x="606" y="363" key="com.intellij.ide.util.TipDialog/0.27.1920.1002@0.27.1920.1002" timestamp="1577972208242" /> <state x="606" y="363" key="com.intellij.ide.util.TipDialog/0.27.1920.1002@0.27.1920.1002" timestamp="1578223460690" />
<state x="642" y="380" key="com.intellij.ide.util.TipDialog/53.27.1867.1053@53.27.1867.1053" timestamp="1575641807897" /> <state x="642" y="380" key="com.intellij.ide.util.TipDialog/53.27.1867.1053@53.27.1867.1053" timestamp="1575641807897" />
</component> </component>
</project> </project>

Binary file not shown.

BIN
settings.zip Normal file

Binary file not shown.

View File

@ -5,7 +5,7 @@ import numpy as np
from pygame import mixer from pygame import mixer
count = 0
def display(length): def display(length):
@ -28,6 +28,7 @@ def display(length):
def alert(): def alert():
mixer.init() mixer.init()
alert = mixer.Sound('src/noises/beep-07.wav') 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: if event == cv2.EVENT_LBUTTONDOWN:
global displayString global displayString
if len(displayString) == 4:
print('zero')
displayString = ""
if 348 <= y <= 370 and 59 <= x <= 86: if 348 <= y <= 370 and 59 <= x <= 86:
print("1 outdoor") print("1 outdoor")
@ -126,13 +125,40 @@ def click_event2(event, x, y, flags, param):
displayString = displayString + '#' displayString = displayString + '#'
print(displayString) print(displayString)
display(len(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(): def notification():
not1 = cv2.imread('src/notification/not1.png') not1 = cv2.imread('src/notification/not1.png')
@ -147,13 +173,15 @@ def notification():
global a global a
a = None a = None
global count
count = 0
global displayString global displayString
displayString ="" displayString =""
i = 0 i = 0
cam_status = 1 cam_status = 1
liczba = 0 liczba = 0
globalna = 0 globalna = 0
displayString3 = "jud"
cap = cv2.VideoCapture(0) cap = cv2.VideoCapture(0)
four_cc = cv2.VideoWriter_fourcc(*'XVID') four_cc = cv2.VideoWriter_fourcc(*'XVID')
out = cv2.VideoWriter('recordings/output.avi', four_cc, 10.0, (1280, 720)) out = cv2.VideoWriter('recordings/output.avi', four_cc, 10.0, (1280, 720))

BIN
src/images/badpass.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
src/images/goodpass.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB