2012年5月3日 星期四

Skin Detection



frame = cvQueryFrame(capture);
frame1 = cvCreateImage(cvSize(frame->width,frame->height), IPL_DEPTH_8U, 1);

------------------------------
while(true){
        frame = cvQueryFrame(capture);
        cvCvtColor(frame, frame, CV_BGR2YCrCb);
        cvInRangeS(frame, cvScalar(0,137,77), cvScalar(256,177,127), frame1);

        XXXXXXXX

}

作業:   面膜



鋼鐵人
           面具自選   眼睛須去背




Trace Program:
------------------------
uchar* ptr3=(uchar*) frame1->imageData;
int id = 0;
int mouseX=0;
int mouseY=0;
while (ptr3[id] == 0 && id < (frame1->height*frame1->width))
id++;
mouseY = id/frame1->width;
mouseX = id%frame1->width;
printf("%5d %5d\n", mouseX, mouseY);

-----------------------

2010年2月18日 星期四

HW12: Line and Circle Detection

How many lines and circles on your body?

Hough Transformhttp://en.wikipedia.org/wiki/Hough_transform







1. Download HW12-01.cpp and line.jpg.
2. Trace the above program.
3. Modify it such that the program can find lines on your body.
4. Download HW12-03.cpp and circle.jpg.
2. Trace the above program.
3. Modify it such that the program can find circles on your body.

HW10: X-Projection and Y-Projection

1. Download the HW08-2.cpp program from webhd.mcu.edu.tw. Excute and trace the program.Study the codes implementing X-projection and Y-projection.
2. Draw the following lines based on X-projection and Y-projection.  



Virtual Mouse

3. Design a virtual mouse using X-projection and Y-projection.
4. Design a virtual button using information extracted by background subtraction.
5. Design a simple paint program.


 


HW09: Y-Projection

Jumping Game

1. Download the HW08-2.cpp program from webhd.mcu.edu.tw. Excute and trace the program.Study the codes implementing Y-projection.

2. Design a jumping game using Y-projection.
3. Extend the game such that it can be palyed by two person.

4. Extend it to be a stooping game.

2010年2月12日 星期五

HW08: Background Subtraction

Who are you?




1. Download the HW08.cpp program from webhd.mcu.edu.tw.
2. Excute and trace the program.
 3. Study the codes.

Body Shap Game 
4. Download the HW08-2.cpp, mask1,jpg and mask2.jpg from webhd.mcu.edu.tw.
5. Excute and trace the program. 6. Study the codes. HW08-2.cpp is a game that will coount the overlapped area between the mask and your body. You win the game if the the overlapped area is larger than a predefined percentage of the mask.



7. Design a new mask for the game.
8. Design a mask in which two person have to cooperate to pass the game.
9. Design a mask in which two person have to compete to pass the game.
10. Use cvPutText to let the video to show some text information like socres or winners.
11. Extend the game to have a sound to hint the user if he or she passes the game.
12. Extend the game to have multiple levels with different masks.

HW07: Color Detection Project Show

HW06: Color Detection Project Design

http://www.youtube.com/watch?v=8-4kwQ_91gU&NR=1

http://hwshow-05.blogspot.com/search?q=%E7%B4%85%E7%99%BD

http://hwshow-23.blogspot.com/2011/06/blog-post_1132.html