A Picture Collage II
Assignment
For this assignment you will again be creating a collage of images.
You should choose your images and composition to reflect the interest that you
have so that your collage tells us something about who you are. You will be
creating a variety of image manipulation routines that will be needed to create
your collage.
Requirements
The requirements for this assignment can be partitioned broadly into (i) the
base requirements (including following the instructions faithfully), (ii) a few
required transformations, and (iii) a set of optional transformations.
Points are awarded in each category.
Base Requirements
- Make the following additions/changes to your
MyPicture.java file. Submit this file in a folder named
Program8
that you create in your Assignment
Inbox. You will also need to create an application class with a main method that is responsible for retrieving the input pictures from disk, creating MyPicture objects, invoking transformations on those objects, and finally writing out the resultant picture to the disk as a jpeg file. Also submit copies of your original images (described below) and your
final collage project in a file named
collage.jpg. Please be sure to
use all these filenames exactly as they are spelled here.
- Your collage must have at least four images including
one for the background if you wish to create your collage in this way. You are welcome to include more pictures as your design dictates. Search for images that reflect what you
do and who you are (they will all have to be jpg files). Compose your images
artistically.
Core Transformations
-
You must use your scaling routine (from Picture Project I) at least once.
-
You must use a
cropping routine at least once.
- You obviously
must use an overlay routine to place the images on the collage.
For all of your image
manipulation routines, the method should create and ultimately return a new MyPicture instance that contains the specified
changes so that the original image is left unchanged. (This is the design
choice we have been making consistently in class.)
- You can use your posterize and greyscale methods from the last project as well.
You may be awarded up to 45 points for the core application, good commenting, naming and structure, and for your artistic creativity in the resulting picture.
Elective Transformations
- (15 pts) Write a
cropping routine that extracts a circle instead of a rectangle.
- (15 pts for the set of all three) Write routines to rotate the image by 90, 180, and 270 degrees.
- (10 pts) Generalize your
circle cropping routine to extract an ellipse (oval). Note: These are ten additional
points plus you must also do the circle routine.
- (10 pts) Write a second
overlay routine that considers ”pure black” or "pure white" as transparent.
- (15 pts) Write a routine to rotate an image through an arbitrary angle between 0 and 360 degrees.
- (15 pts) Do you remember
what you look like in those ”fun house” carnival mirrors that distort your
image? Write a routine to perform these fun house mirror distortions.
- (? pts) Do you have
other creative ideas? Ask the instructor and receive additional bonus points
for some other image manipulation routine.
Details:
- Circle Crop: Obviously you must create a rectangualr (square) image, but extract only a circular portion of the original image and make the outer boundaries of the square pure black (so it works especially well with a transparent overlay described below). Specify the center (x,y) and radius of the cropping. Name your method cropCircle. Handle the case where the circle extends the boundaries of the original image.
- Transparent
Overlay: Same as an overlay except that any pure black areas in the
overlaying image ”bleed through” and pick up the underlying image below. Name
your method transparentOverlay.
- Ellipse Crop:
Remember an ellipse? Two centers and a constant sum of distances? This
allows you to do oval croppings. Name your method
cropEllipse.
- Rotation1:
Rotate an image 90, 180, and 270 degrees clockwise. Name your methods
rotate90, rotate180, and rotate270.
- Rotation2: Specify the angle of rotation (in degrees) between 0 and 360 (actually allow any arbitrary angle including negative angles). Rotate the image counter clockwise in this many degrees. Name your method rotate.
- Carnival Mirror: Mirrors either distort horizontally or
vertically but usually not both. So you can choose one or implement both.
Consider the horizontal distortion: the vertical distances are all left
unchanged. But the horizontal features are either expanded or compressed from
the mid axis running vertically through the image. You can use a sine function
to nicely imitate this gradual compression/expansion. Name your method
carnivalMirror.
- Out of
bounds?: Many of these routines will create images that exceed the
dimensions of the source image. If you need to put a pixel out of bounds, then
obviously just ignore it (this part of the image will be omitted).
- Others: If
you create your own image manipulation routines, then be sure to comment them
extensively so that we know how to use them and what they are supposed to do.