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

Info icon This 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.
Image of page 1

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern