This is an old revision of the document!
FYP IK0902 iPhone Games
Title
iPhone Gaming
People
Progress
Week | Details | References |
---|---|---|
Before Semester (Summer 2009) | - Application Proposal for WWDC2009 - fyp_summer.pdf | |
Week 0 (1 - 8 September 2009) | - Meeting with 2 developers | |
Week 1 (9 - 15 September 2009) | - Marketing Research & Brainstorming - fyp_w1.doc | Top 20 iPhone Games Game Incentive Report |
Week 2 (16 - 22 September 2009) | - Idea Design - fyp_w2.doc | Photo Booth Photo Funia |
Week 3 (23 - 29 September 2009) | - Language Learning - Photo Selection and basic editing on iPhone App (Flipping) | Pick Image Image Transformation |
Week 4 (30 Sept. - 6 October 2009) | - Specification specification_of_iphone_game.doc - Meeting with supervisor of view lab to discuss on face identification - Save Image | OpenCV |
Week 5 (7 - 13 October 2009) | - Study ebook of OpenCV library - Try to import openCV to iPhone | OpenCV - Learning OpenCV (Computer Vision with the OpenCV Library) |
Week 6 (14 -20 October 2009) | - Research about openCV on Mac - Development on face identification on static photo image | Official OpenCV |
Week 7 (21 - 27 October 2009) | - Testing on face identification on still photo - Studying the OpenCV library |
|
Week 8 (28 Oct. - 3 Nov. 2009) | - Testing on the rotation angle on face - Research on limitation about the OpenCV on face detection |
|
Week 9 (4 - 10 November 2009) | - Documentation & Function Learning - Research on limitation about the OpenCV on face detection - Requesting for the Apple Developer License | Face Detection wiki Face Detection Ref. |
Week 10 (11 - 21 November 2009) | - Implementation the program on iPhone - Testing the efficiency on iPhone - Documentation |
|
Week 11 (22 Nov - 1 Dec 2009) | - Documentation - Semester 1 Report - Image Laygering 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 |
---|---|
![]() | ![]() |