Commit 355e564d authored by tihmels's avatar tihmels

Projekt abgabebereit gemacht

parent 7c716ac1
......@@ -37,6 +37,9 @@ Setup
***************
Model Injection
***************
......
......@@ -2,6 +2,7 @@ from threading import Thread
import cv2
class WebcamVideoStream:
def __init__(self, src=0):
......
......@@ -15,9 +15,10 @@ import argparse
import glob
import logging
import random
import sys
import cv2
import numpy as np
import sys
from email_service import sendMail
......
......@@ -19,6 +19,7 @@ import shutil
import sys
import cv2
from email_service import sendMail
from face_detect import locate_faces
......
......@@ -14,13 +14,12 @@
import argparse
import cv2
import cv2.face
from cv2 import *
import numpy as np
from RingBuffer import RingBuffer
from WebcamVideoStream import WebcamVideoStream
from face_detect import extract_faces
from image_commons import nparray_as_image, draw_with_alpha, draw_img
from image_commons import nparray_as_image, draw_alpha_3dim, draw_2dim
parser = argparse.ArgumentParser(description='ProjectMood Emotion Detection')
parser.add_argument('-0', action='append_const', dest='emotions', const='neutral', help='neutral')
......@@ -88,7 +87,7 @@ def show_webcam_and_run(model, emoticons, window_size=(600, 600), window_name=pa
processed_image = nparray_as_image(normalized_face[:, :], mode='L')
w, h = vc.size()
# And print it to the frame
draw_img(frame, processed_image, (w - 300, h - 300, 250, 250))
draw_2dim(frame, processed_image, (w - 300, h - 300, 250, 250))
# No entry in the ring buffer is None
if not (any(x is None for x in predictions)):
......@@ -97,7 +96,7 @@ def show_webcam_and_run(model, emoticons, window_size=(600, 600), window_name=pa
# Most frequent value is displayed
image_to_draw = emoticons[unique[0]]
draw_with_alpha(frame, image_to_draw, (40, 40, 200, 200))
draw_alpha_3dim(frame, image_to_draw, (40, 40, 200, 200))
cv2.imshow(window_name, frame)
frame = vc.read()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment