440 likes | 450 Views
This project aims to develop a real-time image generation engine for the PhotoHunt game, employing image processing techniques such as image analysis, warping, object appending, and color change. The objective is to mimic human behavior and implement unique features.
E N D
Automatic PhotoHunt Generation Shum Hei Lung To Wan Chi Supervisor: Prof. Michael R. Lyu
Agenda • Background • Objectives • Previous Work • Newly Developed Module • Image Analysis • Image Warping • Object Appending • Enhanced Module • Elimination • Game Engine • Evaluation • Conclusion
Background • PhotoHunt is … • A Spot-the-difference game • Classic yet evergreen • Popular in electronic game centers all over the world However… It is limited by man power
Objectives • Develop real-time Image Generation Engine • Employ image processing techniques • Mimic human behavior • Develop PhotoHunt game • Make use of generation engine • Implement more unique features
Objectives Image Generation Engine • To generate an image for PhotoHunt game • Effects that may be applied: • Elimination • Image Warping • Object Appending • Color Change Definition of well generated image: • The effects should be “NOT OBVIOUS YET DISCOVERABLE”
Previous Work Automatic PhotoHunt Generation Image Processing Foundation Image Generation Engine Applications • Segmentation Module • Modification Module • -Elimination • -Color change • Smoothing module • Semi Automatic PhotoHunt • Game Engine
To detect and extract segment from the input image Three Phases: Pyramid Segmentation Constraint Checking Reference image building Gaussian Pyramid Previous Work Segmentation Module Elimination Module Smoothing Module Game Engine
Previous Work Segmentation Module Elimination Module Smoothing Module Game Engine • Direct Copy Algorithm • Horizontal Gradient Algorithm • Nearest Boundary Algorithm • Enhanced Nearest Boundary Algorithm
Previous Work Segmentation Module Elimination Module Smoothing Module Game Engine • To reduce noise and distortion • To make the image more realistic • Gaussian Filter (Neighbor size=3, sigma=1)
Previous Work Segmentation Module Elimination Module Smooth Module Game Engine
Last semester Segmentation Module Modification Modules Smooth Image Game Engine
This Semester Segmentation Module Image Analysis Modules Enhanced Game Engine Image Warping Color Change Enhanced Elimination Object Appending Smooth Image
Image Analysis Module • Purpose • To extract useful information from the image in order to assist the generation process Color Change Elimination Segmentation Module Image Analysis Module Image Warping
Image Analysis Module > Function 1Screening out undesirable segment • Definition of undesirable segment • Regions that are wrongly segmented • Cause of undesirable segment • The engine uses an optimized threshold to segment all images • Assumption Segment & Surrounding have similar color and brightness Reject Segment Come from Same Object Undesirable Segment
Image Analysis Module Functions: • Screening out undesirable segment • Deciding modification to be applied • Providing suggestion on replacement color
Object Mean : [66 72 72] T Bg Mode : [220 231 228] T Diff : 475>60 Object Mean : [66 72 72] T Bg Mode : [220 231 228] T Diff : 284>60 Object Mean : [217 92 76 ]T Bg Mode : [207 81 65] T Diff : 32<60 Object Mean : [3 83 148]T Bg Mode : [10 99 163] T Diff : 39<60 Image Analysis ModuleScreening out undesirable segment • Procedures: • Compute Mean of Object –(1) • Compute Mode of Background –(2) • Compare (1) and (2) Accept Accept Reject Reject
The property of image for the specified effect: Regular in shape Single Colored Any shape Image Analysis Module > Function 2Deciding modification to be applied
Object Neighbor Difference<Threshold1 • Object Variance < Threshold2 No yes Color Change Object occupied Area>70% Image Analysis Module > Function 2Deciding modification to be applied No yes Elimination Image Warping
Image Analysis Module > Function 3 Suggestion on replacement color
Image Warping • Produce Distortion by applying geometric transformation.
Transformation1 Transformation2 linear of x Quadratic of y Image WarpingForward mapping algorithm • Transformation Equation (General)
Mid pt Δy=max minX Δy=0 maxX Δy=0 Transformation Equation • Transformation 1 • Transformation 2 Δymax • Quadratic equation of root x=minX or maxX 2. Substituting (midptX, Δymax) into the equation to acquire the weight to control curvature minY • Flip the upper part, y>mid pt y • Enlarge the curve with a ratio proportional to distance between mid pt of y midptY maxY
Object Appending • To append an object from our database to the original image • Unable to carry out object recognition • Only generic objects are inserted to engine
Elimination Module • Hybrid Elimination Makes use of statistic data that came from the image analysis module Information Needed: • Background Mode • Background Neighbor Difference • Background Mean
Hybrid Elimination Algorithm • Check Background Neighbor Difference - To check whether the background is single colored Case 1: Use the Background Mode to replace Case 2: Apply texture from surrounding • Select the suitable surrounding region • Apply Direct copy Algorithm
System Interface • In later demo session
Acceptance Rate Assume Acceptance rate= 75% = 988/1318 accepted images Thus, x-axis is about 200 in upper limit and 4500 in lower limit.
Processing Time • Run one set of 1318 images for 17 times • Average Processing time per set: • 00:15:50 • Average Processing time per image • 0.721 second
Image Quality • Survey Result • Total Visitors : 91 • Total Hits: 1109 • Total Images : 264 • Received Survey : 121 • Total Segments : 605 Satisfy 76% • Characteristics image shared for achieving good effects: • Many objects within the image • Sharp Edge of object • Less noise • Maybe a cartoon Not Satisfy 24%
Conclusion • Developed the image generation engine • Developed the game engine • Carried out testing and analysis on the system • Published the product to the public • We are still watching the statistic and looking at feedback to improve our system
The End Thanks for your kind attention.