CS 111 - PROGRAM DESIGN I, Spring 2018

Lab Assignment 10

Due: Wednesday, 4/4/2018 by 11:59 pm

For this lab, we want to take some existing functions that were written during lecture and use them together to create a new different result than for which they were originally being used.

We want to use the following functions:

The primary task of this lab will be write the main() function that will call the above functions in the proper way to get the desired effect.

Step 1: Get the picture blue-mark.jpg from the computer.

Step 2: Crop the picture to get just the head of person from the blue-mark.jpg picture. Use the coordinates that were used in the lecture example contained in lect0322.py

Step 3: Posterize the cropped result from Step 2 using the modPicture() function from lect0301d.py The posterize function does a 4 color posterization using the colors of blue, red, green and yellow.

Step 4: Create a horizontal collage of the posterized result from Step 3 so the picture appears 3 times using the makeCollageHorz() function from lect0322a.py

The picture you are to start with is

  • blue-mark.jpg
After the crop using coordinate of (263, 161) for the upper left corner and the coordinate of (383, 304) for the lower right coordinate, you should get the result of:
  • lab10Crop.jpg
After the posterize, you should get the result of:
  • lab10Posterize.jpg
After making the collage, you should get the result of:
  • lab10Result.jpg
You code should be written in the python program named NetIDLab8.py that will contain a function named main( ) that will do the following:
  1. Print out your name and your net-id

  2. Prompt the user to select the blue-mark.jpg picture from the local computer
  3. Do the described operations above to create the cropped, posterized and repeated result
  4. Save the resulting picture to a file on the local machine
  5. You must write your programs using good programming style which includes:
    • Good variable names
    • in-line commenting
    • header block commenting for the program and each method written
      Be sure to include the following with the header block comment for the program.
      • your name
      • day and time of your CS 111 lab section (i.e. Monday at 2:00)
      • A description of the project.
    • proper indentation of program statements
    • use of blank lines to separate blocks of code

How assignments should be submitted

You are to submit your program electronically using the link for Lab 10 on the Assignments Page in Blackboard.

Topic attachments
I Attachment Action Size Date Who Comment
JPEGjpg blue-mark.jpg manage 59.7 K 2018-04-01 - 22:35 UnknownUser  
JPEGjpg lab10Crop.jpg manage 3.4 K 2018-04-01 - 22:37 UnknownUser  
JPEGjpg lab10Posterize.jpg manage 4.3 K 2018-04-01 - 22:40 UnknownUser  
JPEGjpg lab10Result.jpg manage 11.5 K 2018-04-01 - 22:41 UnknownUser  
Topic revision: r1 - 2018-04-01 - 22:45:59 - Main.troy
Copyright 2016 The Board of Trustees
of the University of Illinois.webmaster@cs.uic.edu
Helping Women Faculty Advance
Funded by NSF