1 / 23

Laboratory 6

COMP1610/DGC1330. Laboratory 6. COMP1610/DGC1330. Learning Outcomes. In this laboratory section, you will Understand the principles of using webcam in Processing and apply webcam as new input modality;

Download Presentation

Laboratory 6

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. COMP1610/DGC1330 Laboratory 6

  2. COMP1610/DGC1330 Learning Outcomes In this laboratory section, you will Understand the principles of using webcam in Processing and apply webcam as new input modality; Able to integrate live video feeding and computer generated imagery in real-time and develop simply Augmented-Reality visual application; Make use of the concepts of Looping and Repetition in Processing to develop visually rich interactive application.

  3. COMP1610/DGC1330 Tasks In this laboratory section, you have to complete the following task: Design your own pattern from live captured video.

  4. COMP1610/DGC1330 Download file Download the file from: http://www.comp.hkbu.edu.hk/~comp1610/lab/WinVDIG_105.exe Double click to open it

  5. COMP1610/DGC1330 Download file

  6. COMP1610/DGC1330 Download file

  7. COMP1610/DGC1330 Download file If you can see video from webcam, close the program

  8. COMP1610/DGC1330 Download file Download the file from: http://www.comp.hkbu.edu.hk/~comp1610/lab/lab6.zip Extract the Zip file and open “lab6.pde”. Extract the zip file Open lab6.ped

  9. COMP1610/DGC1330 Open file There are two tabs, you only have to edit the first tab, “lab6”. Tab “lab6”

  10. COMP1610/DGC1330 Open file In this lab, same as lab5, you are asked to fill in the missing codes.

  11. COMP1610/DGC1330 Task 1 Design your own pattern from live captured videos. Design your patterns. I have done this for you.

  12. COMP1610/DGC1330 Task 1 Example: Can you find this?

  13. COMP1610/DGC1330 Task 1 Example: X coordinate Y coordinate 1/size (735 , 435)

  14. COMP1610/DGC1330 Task 1 Different sizes! Example:

  15. COMP1610/DGC1330 Task 1 Example: How to put four frames here?

  16. COMP1610/DGC1330 Task 1 Example: How to use a for loop instead? small_frame( 42, 59, 4 ); small_frame( 202, 59, 4 ); small_frame( 362, 59, 4 ); small_frame( 522, 59, 4 );

  17. COMP1610/DGC1330 Task 1 Example: cam.width = width of original video width small_frame( 42, 59, 4 ); small_frame( 202, 59, 4 ); small_frame( 362, 59, 4 ); small_frame( 522, 59, 4 ); for (int x=0; x<4 ; x=x+1) { small_frame(x*cam.width/4 +42, 59, 4); }

  18. COMP1610/DGC1330 Task 1 How about 5 frames? Example: for (int x=0; x<4 ; x=x+1) { small_frame(x*cam.width/4 +42, 59, 4); } for (int x=0; x<5 ; x=x+1) { small_frame(x*cam.width/5 +42, 59, 5); }

  19. COMP1610/DGC1330 Task 1 More information: Similar to mousePressed() Space bar is pressed Save the current frame as a jpg picture

  20. COMP1610/DGC1330 More example: Download the file from: http://www.comp.hkbu.edu.hk/~comp1610/lab/lab6_funny.zip Extract the Zip file and open “lab6_funny.pde”.

  21. COMP1610/DGC1330 More example: Frames will be shown up sequentially.

  22. COMP1610/DGC1330 Hand-in Submission steps: Save your files and zip all of them, including “data” folder Rename the zip file into “xxxxxxxx-lab6.zip” (where xxxxxxxx is your Student ID.) Upload to BU e-Learning. Deadline: 19/10/2011 23:59

  23. COMP1610/DGC1330 More information Some useful websites about Processing: Reference of functions: http://www.processing.org/reference/ Online tutorial: http://www.learningprocessing.com/ Others work: http://www.openprocessing.org/

More Related