2010年1月22日 星期五

HW02: Image-Level Processing in OpenCV

1. Download HW02.cpp from webhd.mcu.edu.tw.
2. Excute and trace the program.
3. Study the codes.
4. Extend HW01.cpp to generate three videos. The first one is gray-level video. The second one is the black and white video. The third one is a video with edges only. Note that you need to use cvFlip() function to change the display of videos.



5. Modify the vaue of the third parameter in
cvThreshold( gray, bw, 127, 255, CV_THRESH_BINARY );
such that your face becomes black.
6. Find the differences between
cvThreshold( gray, bw, 127, 255, CV_THRESH_BINARY );
cvThreshold( pImg, pImg2, 127, 255, CV_THRESH_BINARY );
7. How many colors in the pImg2 image?
8. Use cvResize() function to extend HW02.cpp such that the displayed images have the following effects.


9. (Optional) Study functions of cvDilate() and cvErode().



Post your results to HWShow.

沒有留言:

張貼留言