I've Still Got No Feelings

Daryl Hannah Daryl Hannah After writing my last blog my wife detached her Achilles tendon (one of them). We had just moved from Broward county, so my wife wanted to have the surgery done there because people she knew were recommending surgeons in Broward. I took my website down for the two weeks we were in Broward (we're broke, and couldn't afford to leave the AC running while we were gone) and didn't have any way to work on the Feelings program while I was gone. Besides taking care of my wife after her surgery, I spent the two weeks taking an online course in Python; I can now actually understand the code I've been downloading off of the Internet. I added code for detecting the nose and mouth. The nose probably doesn't convey a lot of emotional information, but the mouth does; lip ends pointing up denotes a smile and lip ends pointing down denotes a frown. I had to restrict the mouth search to the area below the nose, so locating the nose worked out. BTW, the reason I had to restrict mouth searching to the area below the nose is because the mouth XML file I'm using to locate mouths, thinks the eyes are mouths.

The picture on the left is of Daryl Hannah; the input to facial6.py. The picture on the right is the output of facial6.py. As you can see, facial6.py correctly identified Daryl Hannah's face, eyes, nose, and mouth. I copied an XML file (Nariz.xml) off of the Internet for identifying Noses. I also downloaded an XML file for mouth detection, the OpenCV package ony had an XML file for smiles; I want frowns and every other mouth configuration to be detectable.

Here's the code I used to process the Daryl Hannah jpeg:

facial6.py haarcascade_mcs_mouth.xml Nariz.xml

 

There are other XML files besides the two listed above; see my last blog too get those XML files. Now that I can find the facial features I need to determine what emotion the facial expression denotes (I think that's it, anyway.) I need to get XML files for anger, fear, disgust, contempt, joy, sadness, and surprise. I did mention earlier that OpenCV comes with a smiles XML file; I'll start testing with that; i.e., when I detect a mouth I'll then check to see if it is also in the smiles XML file (should denote joy).
I'll post more blogs about this project as it progresses.

Return To My Blog Page       Return To My Programming Page