This is an old revision of the document!
FYP IK0902 Application on iPhone
( 2009 Fall Semester | 2010 Spring Semester )
Title
iPhone Gaming
People
Progress
Week | Details | References |
---|---|---|
Week 1 (11 - 18 September 2009) | - Meeting with supervisor & other two groups - Review of project with other groups | |
Week 2 (19 - 25 September 2009) | - Marketing Research on current apps - Idea Brainstorming | |
Week 3 (16 - 22 September 2009) | - Specification - Image layering feature |
Time Schedule (Temp.)
September | - Idea Design (e.g. Idea, Target User, etc.) - Learning Objective C for developing iPhone program |
---|---|
October | - Learning & Testing Objective C programming language - Application Design (e.g. Theme, User Interface, etc.) |
November | - Code implementation - Report Writing - Release of prototype |
December - | - Application Testing |
Planning Time Schedule
Week 9 | - Enhance the features of face identification - Testing and documentation - Implement Coding about using camera function |
---|---|
Week 10 | - Debugging and program refinement |
Week 11 | - Final testing of the application |
Week 12 | - Documentation |
Week 13 | - Documentation |
Week 4: Photo Selection and Editing
Further editing: Flipping | ||
---|---|---|
![]() | ![]() | ![]() |
Orignal | First flip horizontally | Second flip vertically |
Week 6: Face Detection on Photo
You can click the “save” button, and the saved photo will be in the photo library
Week 7: Testing on Face Detection
Testing Samples | ||
---|---|---|
![]() | ![]() | ![]() |
![]() | ![]() | ![]() |
![]() | ![]() | ![]() |
![]() | ![]() | ![]() |
![]() | ![]() |
Until now, Maximum number of face detected: 10
More testing will be done on the size of the face, tiling angle of the face…etc
Week 8: Testing on Horizontal Rotation Angel
Rotation to the left side | ||
---|---|---|
Left 5 degrees | Left 10 degrees | Left 15 degrees |
![]() | ![]() | ![]() |
Left 20 degrees | Left 25 degrees | Left 26 degrees (Cant detect!!!) |
![]() | ![]() | ![]() |
- The maximum rotation angle to the left is found to be about 25 degrees.
Rotation to the right side | ||
---|---|---|
Right 5 degrees | Right 10 degrees | Right 15 degrees |
![]() | ![]() | ![]() |
Right 20 degrees | Right 24 degrees | Right 25 degrees (Cant detect!!!) |
![]() | ![]() | ![]() |
- The maximum rotation angle to the right is found to be about 24 degrees.
Week 9: Code Understanding
cvHaarDetectObjects( const CvArr* _img, CvHaarClassifierCascade* cascade, CvMemStorage* storage, double scale_factor, int min_neighbors, int flags, CvSize min_size )
This function will detecting the face on the whole image and returning the sequence of faces (rectangle).
The default parameters (scale_factor=1.1, min_neighbors=3, flags=0) are tuned for accurate yet slow face detection.
For faster face detection on real video images the better settings are (scale_factor=1.2, min_neighbors=2, flags=CV_HAAR_DO_CANNY_PRUNING).
*CV_HAAR_DO_CANNY_PRUNING* If it is set, the function uses Canny edge detector to reject some image regions that contain too few or too much edges and thus can not contain the searched object. The particular threshold values are tuned for face detection and in this case the pruning speeds up the processing.
Week 10: Implementation on iPhone
Performance | |
---|---|
On Mac | Immediate (Less than 1 sec) |
On iPhone 3GS | About 2 sec |
On iPhone 3G | About 4 sec |
* One of the factors that affecting the time required to perform the face detection is the processing power of the machine.
Accuracy | 24 faces | 48 faces |
---|---|---|
On Mac | ![]() Can detect ALL the faces | ![]() Can detect ALL faces |
On iPhone 3GS & 3G | ![]() Can detect ALL the faces | ![]() Can detect 8 faces |
* The accuracy will also be affected by using different machines.
Resolution | 30 x 38 | 20 x 25 | 15 x 20 | 14 x 19 | 10 x 13 |
---|---|---|---|---|---|
Photo | ![]() | ![]() | ![]() | ![]() | ![]() |
Result | ![]() Success | ![]() Success | ![]() Success | ![]() Fail | ![]() Fail |
* As the photo will be resized in the iPhone, the resolution affects only when the face is COMPLETELY distorted.
Fine Tuning
The time required varies by adjusting the scale factor in the face detect function. It is the factor by which the search window is scaled between the subsequent scans, for example, 1.1 means increasing window by 10%. The smaller the scale factor, the chance of recognizing an object is bigger. But the scale factor has to be bigger than 1. And 2.1 is found to be the most optimum value for scale factor until now.
Week 11: Features Enhancement & Documentation
We had added a function to add different hats according to the face location.
Added Features | Christmas Hat | Classic Hat | Witch Hat | Safety Hat |
---|---|---|---|---|
![]() | ![]() | ![]() | ![]() | ![]() |
Also, we can add hat to photos that are taken by the iphone camera.
Taken by camera |
---|
![]() |
Moreover, we can add more than one hat in a single photo.
Two Faces | Added Hat |
---|---|
![]() | ![]() |