popArt - function imarr = popArt(fn) % 1. Read in the image...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
function imarr = popArt(fn) % 1. Read in the image file as a uint8 matrix. % 2. Create a new, smaller image which is 1/4 the size of the % original image (halve the number of pixels in each row and each % column). This should be done using the round and linspace % functions. % 3. (Image 1) Create a copy of this smaller image that has been % converted to grayscale. % 4. (Image 2) Create a copy of the original smaller image that has % the following alterations: % a. Swap the red and green layers of the top half. % b. Swap the green and blue layers of the bottom half. % c. Take the negative of the image. % 5. (Image 3) Create a new copy of the original smaller image, and % then make the following alterations: % a. Simultaneously change all pixels with value greater than or % equal than 128 to have a value of 64, and change all pixels % with value less than 128 to 192. % b. Separate the image into equal halves, the left half and the % right half, and then swap their positions. % 6. (Image 4) Create a new copy of the original smaller image, and % then make the following alterations: % a. Separate this image into four square quadrants of equal % size. This configuration should look something like the % illustration in step 7. % b. Rotate each indiviudal quadrant by 180 degrees (you might % find your rotImage function useful for this). % c. Concatenate these rotated images together. Each quadrant % should be returned to its original location. % 7. Concatenate Images 1, 2, 3, and 4 together to create one image %- Subdivide your image the same way as in divImg - round all divisions % of 2 up. img = imread(fn);
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

popArt - function imarr = popArt(fn) % 1. Read in the image...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online