To play around with the bluescreen code, we'll use a few more images, including these:
paris.jpg -- incomparable Eiffel tower in Paris
yosemite.jpg -- Half Dome in Yosemite California, an amazing place to visit
redwood.jpg -- Redwood tree. Redwood trees are typical of the northern California coast where Stanford is located. (This tree is actually in Nick's front yard)
Here is the striped-fish-green.jpg image:
Write bluescreen code to place this fish in front of the yosemite.jpg background. The fish has bits of blue on it, but that's ok since we're using a green background in this case. Adjust the code so that all of the green towel below the fish disappears. Little flecks of white will appear in the blue middle section of the fish; we're stuck with those with our current technique.
For this problem, we'll accomplish a sort of artistic effect, working with the redwood.jpg image:
And the pebbles.jpg image:
Write bluescreen code to modify the redwood.jpg image, replacing the trunk and some of the branches of the tree with pixels from pebbles.jpg. The result is a sort of fanciful looking stone-tree image. Adjust the code so that the pebbles are on the trunk and some of the branches; don't put pebbles all over the bottom of the image.
This problem is titled "Fish Dreams of Paris". This problem will use paris.jpg:
Here the striped fish is facing right in front of a blue background. Parts of the fish itself are blue -- the eye and the vertical stripe in the middle. For this problem, we'll let the background image replace those two blue areas as well.
Write bluescreen code to place striped-fish-blue.jpg in front of paris.jpg. In particular, adjust the code so that the blue background, the blue middle stripe, and blue eye of the fish all show the paris.jpg pixels. Adjust the code so the blue towel background below the fish is almost completely replaced.
For this problem, write code to blend striped-fish-green.jpg into the yosemite.jpg image. The background of striped-fish-green.jpg is green:
The result should look mostly like the regular yosemite.jpg image, but with a faint fish on the rocks. Divide the fish pixels by about 5.
This button will retrieve the code that has been run/saved from this page. Generally you retrieve your code all at once from a "homework" page, but this button is an alternative to retrieve your code for a particular exercise.
count 4 : image-8-ex1 image-8-ex2 image-8-ex3 image-8-ex4