mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-10-01 03:43:46 +08:00
enable flake8 E502: backslash is redundant between brackets
old-commit-hash: 6466ec982aa47bcbbc7c6a3a7cf60cec0163be84
This commit is contained in:
@@ -49,23 +49,23 @@ if __name__ == "__main__":
|
||||
img = np.zeros((320, 160, 3))
|
||||
if faceProb > 0.4:
|
||||
cv2.putText(img, 'you', (int(facePosition[0]*160+40), int(facePosition[1]*320+110)), cv2.FONT_ITALIC, 0.5, (255, 255, 0))
|
||||
cv2.rectangle(img, (int(facePosition[0]*160+40), int(facePosition[1]*320+120)),\
|
||||
cv2.rectangle(img, (int(facePosition[0]*160+40), int(facePosition[1]*320+120)),
|
||||
(int(facePosition[0]*160+120), int(facePosition[1]*320+200)), (255, 255, 0), 1)
|
||||
|
||||
not_blink = evt.driverMonitoring.leftBlinkProb + evt.driverMonitoring.rightBlinkProb < 1
|
||||
|
||||
if evt.driverMonitoring.leftEyeProb > 0.6:
|
||||
cv2.line(img, (int(facePosition[0]*160+95), int(facePosition[1]*320+140)),\
|
||||
cv2.line(img, (int(facePosition[0]*160+95), int(facePosition[1]*320+140)),
|
||||
(int(facePosition[0]*160+105), int(facePosition[1]*320+140)), (255, 255, 0), 2)
|
||||
if not_blink:
|
||||
cv2.line(img, (int(facePosition[0]*160+99), int(facePosition[1]*320+143)),\
|
||||
cv2.line(img, (int(facePosition[0]*160+99), int(facePosition[1]*320+143)),
|
||||
(int(facePosition[0]*160+101), int(facePosition[1]*320+143)), (255, 255, 0), 2)
|
||||
|
||||
if evt.driverMonitoring.rightEyeProb > 0.6:
|
||||
cv2.line(img, (int(facePosition[0]*160+55), int(facePosition[1]*320+140)),\
|
||||
cv2.line(img, (int(facePosition[0]*160+55), int(facePosition[1]*320+140)),
|
||||
(int(facePosition[0]*160+65), int(facePosition[1]*320+140)), (255, 255, 0), 2)
|
||||
if not_blink:
|
||||
cv2.line(img, (int(facePosition[0]*160+59), int(facePosition[1]*320+143)),\
|
||||
cv2.line(img, (int(facePosition[0]*160+59), int(facePosition[1]*320+143)),
|
||||
(int(facePosition[0]*160+61), int(facePosition[1]*320+143)), (255, 255, 0), 2)
|
||||
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user