Wednesday, June 6, 2012

Too hard to say Goodbye


 All these troubles
               will give us stories to tell each other later in life                                                                                     ----- Shakespeare




Time flies.
Today, is the last day in cse155 this quarter.
Thank you all for leaving me such a wonderful memory of my first quarter in America.

Hope to see you in the next 6 months in UCSD ~

Thank you!

Final Report



Want 2 Find U
---
Too Hard To Say Goodbye
0. Description
 I. Milestones
II. Method 
III. Tools


0. Description
    Sketch-Based Face Matching
   1. the User draw a picture of a front face using mouse, and choose the color of the face and eyes and hair.
    /*the User note the key Points of the face, by pointing*/
  2. the application gives back the most closely matched one.




I. Milestones
II. Methods
      1.1. Constrain the Located Features by changing the space located by Haar classifier.

      2.1. Use the Harris Corner Detector in Features that are located by Haar classifier.
      2.2. Get the uppermost, lowermost, leftmost, and rightmost Key Points within the Feature.

      3.1. Use the average Color of the nose to be the representative of the Face.
      3.2. Use the Haar Classifier to locate the Eye, get the average color of the iris.
      
     4. Compare the Faces by checking the length and distances as well as shapes.

III. tool

IV. Database
     Front Face Pictures grabbed from google.

V. Future Plan
   1. add more restrain. Such as the Moles, the eye-wrinkles and so on.
   2. train better classifier for the feature detection & Face Key Point detection.
   3. work out a better algorithm for the searching process.
   4. Try to link this to social network, and use the Location and other information to help in finding the person. 

VI. User Interface

VII. Result
(the most closely one, when i didn't put the original photo in my database)



Using Harris Corner Detector to get the KeyPoints

Using Harris Corner Detector to get the Key Points.(within the located features)
   The key points I got by using Harris Corner Detector are much better than using SURF of SIFT.
   Though, I have to admit that the picture becomes quite scary at the beginning.
But we can easily find that all the Features we need. the eyebrow, eyes, nose and mouth are Covered with a lot of red pots.

SO i decided to use the Harris Corner Detector and Haar Cascade Classifier together to get the key points I want.
When located in to different features, I can get the uppermost, lowermost, leftmost and right most. That is. it is enough to represent the width and length of that feature.



Draw by Mouse

Sketch the face by Mouse

The  user draw a sketch of a face by Mouse.
My code of this part is written in Python 2.7 using OpenCV lib.
 1. Track the movement of the mouse.
 2. Record the move and print it to another page.

it is very hard for the ordinary people without painting experience to draw a face, especially draw by mouse.
So I provide a sketch picture, as the background, to make it easier for the user to draw.

When done, the picture is saved as a new .jpg