510 likes | 629 Vues
The Automated PhotoHunt Generation System, supervised by Prof. Michael R. Lyu, revolutionizes the classic spot-the-difference game. Designed to alleviate human limitations, this system automates image generation with effective techniques such as segmentation and elimination. Our focus is on developing a real-time engine to create engaging PhotoHunt challenges while ensuring changes remain "not obvious yet discoverable." This innovative approach enhances user experience in electronic game centers worldwide and promises to evolve with further developments in segmentation algorithms and additional features for web-based gameplay.
E N D
Automatic PhotoHunt Generation Shum Hei Lung To Wan Chi Supervisor: Prof. Michael R. Lyu
Overview • Background • Objectives • System Implementation • Segmentation Module • Elimination Module • Other Module • Web-based PhotoHunt game • 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
Basic techniques to edit image • Elimination • Color modification • Cloning • Transformation
Objectives • To implement the PhotoHunt Generation Engine • Focus on eliminating object • Develop an engine to support real-time image generation for PhotoHunt game
Image Generation Engine • To generate an image for PhotoHunt game • Effects that may be applied: • Elimination • Color Change • Duplication Definition of well generated image: • The effects should be “NOT OBVIOUS YET DISCOVERABLE”
Image Generation Engine – The Process Segmentation Module Modification Modules Smooth Image GAME Game Engine
Segmentation Module • To detect and extract segment from the input image • Three Phases: • Segmentation • Constraint Checking Area of Input Image/10000<Area of Segment < Area of Input Image/500 • Area of Segment Reference image building 1 1
Segmentation Algorithm The Segmentation algorithms we have examined: Pixel-based Algorithm Edge Detection Algorithm Region-based Algorithm
Gaussian Pyramid Pyramid Segmentation • The Pyramid Segmentation Algorithm • Step 1 Generation of the Gaussian pyramid • Step 2 Segmentation by pyramid-linking and averaging linked-pixel
+ Step 1- Generation of the Gaussian pyramid Father node g(i) Level l 5 5 8 7 6 5 4 Level l-1
Step 2 Segmentation by pyramid-linking and averaging linked-pixel • ct(i,j,l) : local characteristics • ft(i,j,l) : The potential father node • st(i,j,l) : segment property • areat(i,j,l) : area of the segment
Step 2 Segmentation by pyramid-linking and averaging linked-pixel • Set ft(i,j,l) • Initialize areat(i,j,0) =1 ct(i,j,l) =c0(i,j,0) 3. for l = 0 to L st(i,j,L) = ct(i,j,L) for l = L downto 0 st(i,j,l) = ct(i”,j”,l+1)
Step 2 Segmentation by pyramid-linking and averaging linked-pixel 22 4 17 17 17 13 21 15 12 12 17 17 17 17 17 4 22 4
Elimination Algorithm • Direct Copy Algorithm • Horizontal Gradient Algorithm • Nearest Boundary Algorithm • Enhanced Nearest Boundary Algorithm
Where Si is segmented region of the image for i = 0,1,2,…… Direct Copy Algorithm • Directly copy the upper pixel to current pixel
Horizontal Gradient Algorithm • Determine color line by line • Smoothing the changes of color from one side to another Where C(M) is the color verctor of pixel M and dXY is the distance between X and Y
Nearest Boundary Algorithm • Replace the color by the color of nearest boundary Where dmin = min(dPN, dQN, dRN, dSN)
Enhanced Nearest Boundary Algorithm • Improved from Nearest Boundary Algo. Where dmin = min(dPN, dQN, dRN, dSN) S(A,B) is Euclidean distance between A and B
Color Change Module Dominate color segment: % of Pixel of dominate color> 75% Dominate color pixel: DChannel >180 and otherChannel<50
Smooth Image • To reduce noise and distortion • To make the image more realistic • Gaussian Filter (Neighbor size=3, sigma=1)
Limitation • Only elimination and limited color change effect supported • No artificial intelligence control to the Applied effect • Modified area found noise and distortion • Not all user input can be segmented
Looking Forward… • Improve the segmentation algorithm • Implement the Duplication and Transformation module • Support numbers of object recognitions • More Features on the Web-based game • Ultimately, to achieve the complete automatic PhotoHunt generation
The End Thanks for your kind attention.
A1 Example of Pyramid Segmentation c0(0)= 21 c0(1)= 25 c0(2)= 2 c0(3)= 0 c0(4)= 22 c0(5)= 15 c0(6)= 1 c0(7)= 1 c0(8)= 13 c0(9)= 11 c0(10)= 4 c0(11)= 5 c0(12)= 13 c0(13)= 12 c0(14)= 12 c0(15)= 2 c0(A)= 21.2 c0(B)= 2.2 c0(C)= 14.8 c0(D)=3.2 f0(0)= A f0(1)= A f0(2)= B f0(3)= B f0(4)= A f0(5)= C f0(6)= B f0(7)= B f0(8)= C f0(9)= C f0(10)= B f0(11)= D f0(12)= C f0(13)= C f0(14)= C f0(15)= D a0(A)= 3 a0(B)=5 a0(C)= 6 a0(D)= 2 c0(A)= 22.6 c0(B)=1.2 c0(C)= 12.6 c0(D)= 2.5
Frequency Fig 3.2b Histogram of data generated by ThresSeg.cpp Threshold Intensity (0-28) A3 Pixel-based Segmentation -Thresholding
A4 Edge Detection Segmentation-Canny Edge Detection • Phase1 - Gaussian convolution S(x,y)=smoothed image • Phase 2 - Edge strength and direction |M|=|H|+|V| • Phase 3 - Non-maximum suppression - Non-maximum suppression trace along the edge in the edge direction and suppress any pixel value that is not considered to be an edge to zero. • Phase 4 - Hysteresis - continuing the tracking until the Threshold falls behind the lower second threshold
A5 Gaussian Filter Characteristics • Separable (when it is in 2 dimension0) (x,y) = (x) (y) • Normalized • Symmetric • Equal contribution Each pixel should have equal contribution to the father pixel in the upper level.