For this lab you will need to download the following images or copy them from the common_mediasources directory on the p: drive
Open your textbook to p. 111 and locate the four methods presented. Using what you have learned about loops and conditionals, carefully consider each method.
[Q1] What do you PREDICT would be the effect of executing blueOneHundred() on a picture?
[Q2] What do you PREDICT would be the effect of executing removeBlue() on a picture?
[Q3] What do you PREDICT would be the effect of executing noBlue() on a picture?
[Q4] What do you PREDICT would be the effect of executing byeByeBlue() on a picture?
[Q5] Invoke blueOneHundred(). What did you observe? Did this match your prediction from [Q1]? If not, why? What were you "mis-interpreting?"
[Q6] Invoke removeBlue(). What did you observe? Did this match your prediction from [Q2]? If not, why? What were you "mis-interpreting?"
[Q7] Invoke noBlue(). What did you observe? Did this match your prediction from [Q3]? If not, why? What were you "mis-interpreting?"
[Q8] Invoke byeByeblue(). What did you observe? Did this match your prediction from [Q4]? If not, why? What were you "mis-interpreting?"
As we mentioned in Activity B, telling the difference between some of these methods may be very difficult to do.
[Q9] What could you do in order to better understand what these four methods are actually doing? What kinds of tests or images would be helpful?
One possibility is to consider the effect that these methods have on VERY specific colors. For example, consider a simple color "test pattern" This image contains only a handful of very "distinct" colors.
[Q10] Load this image into the image explorer and record the RGB values for each of the 8 main colors. (Use the table provided on the activity report).
[Q11] Looking back over the code for each of the four methods, which colors do you expect to be changed by each of the four methods? (Use the table provided on the activity report).
[Q12] Only AFTER you have made your predictions, test the four methods using the test pattern you downloaded. Which colors were changed by each method? (Use the table provided on the activity report).
Write a method called makeMartian(). This method should use what you have learned about looping and if statements to take an image of a person, and make several modifications:
You can do this to a photo of any person of your choosing. You can use yourself, a friend, your instructor (this photo is me after polishing off the 1 pound "Gunderburger"), or even president Allen (Hopefully he would have a sense of humor about this).
You may check this in as you add each piece, or you can check it in when you are all done.
[SIG1] When you are done creating green skin, show it to a TA for signatures.
[SIG2] When you are done creating red eyes, show it to a TA for signatures.
[SIG3] When you are done creating orange hair, show it to a TA for signatures.
Make some additional changes to the makeMartian() method from Activity C. This can make any changes you would like to play with. For example, you can change to different colors, you can use what you have learned about resizing and copying to create HUGE eyes or a small body. Be creative.
[BONUS SIG] Show this to me when you get done (I want to see what you come up with!)