Commit 7ab441c1 authored by tihmels's avatar tihmels

model hinzugefügt

parent 9ea9b986
This diff is collapsed.
...@@ -12,7 +12,7 @@ logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(levelname)-8s %(m ...@@ -12,7 +12,7 @@ logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(levelname)-8s %(m
args = sys.argv # liest Input Parameter args = sys.argv # liest Input Parameter
logging.debug('Fisherface training initialized') logging.debug('Fisherface training initialized')
file = open("gray.csv", "w") file = open("{}.csv".format('_'.join(args[1:]).lower()), "w")
def _get_faces_from_emotion(emotion): def _get_faces_from_emotion(emotion):
""" """
...@@ -34,8 +34,8 @@ def image_preprocessing(image): ...@@ -34,8 +34,8 @@ def image_preprocessing(image):
""" """
img = cv2.imread(image) # open image img = cv2.imread(image) # open image
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) # convert to grayscale gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) # convert to grayscale
equal = cv2.equalizeHist(gray) blur = cv2.GaussianBlur(gray, (5, 5), 0)
return equal return blur
def make_sets(): def make_sets():
training_data = [] training_data = []
......
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