Assignment 1: Convolution, Interpolation, and Resizing
Overview
This is a placeholder assignment page. Replace this content with your actual assignment details.
This assignment will introduce you to basic image processing concepts and Python tools for image analysis.
Estimated Time: 3-5 hours
Learning Objectives
By completing this assignment, you will:
- Understand basic image representation in digital form
- Learn to use NumPy and OpenCV for image manipulation
- Implement simple image transformations
- Gain experience with Python programming for image analysis
Getting Started
Required Software
Make sure you have installed:
- Python 3.8+
- NumPy
- OpenCV (cv2)
- Matplotlib
- Jupyter Notebook (optional but recommended)
Installation
pip install numpy opencv-python matplotlib jupyter
Part 1: Image Loading and Display (2 points)
For this part, you'll practice loading images and displaying them using different libraries.
- Load the provided sample image using OpenCV
- Display the image using Matplotlib
- Print the image shape, data type, and min/max pixel values
Deliverable: A Python script or Jupyter notebook with your code and output.
Part 2: Basic Image Transformations (3 points)
Implement the following transformations:
- Convert the image to grayscale
- Resize the image to 256x256 pixels
- Rotate the image by 45 degrees
- Flip the image horizontally
Deliverable: Your transformed images and code.
Part 3: Pixel Manipulation (3 points)
- Create a function to invert an image (negative)
- Implement a function to adjust brightness
- Create a simple threshold function
Deliverable: Functions with documentation and example outputs.
Part 4: Histograms (2 points)
- Compute and plot the histogram of the grayscale image
- Implement histogram equalization
- Display the original and equalized images side-by-side
Deliverable: Plots and analysis of the results.
Submission Guidelines
Submit a single ZIP file to Gradescope containing:
assignment1.pyorassignment1.ipynb- Your coderesults/folder - Output imagesREADME.txt- Brief description of your approach and any challenges
File Structure
assignment1_submission.zip
├── assignment1.py (or .ipynb)
├── results/
│ ├── part1_output.png
│ ├── part2_*.png
│ ├── part3_*.png
│ └── part4_*.png
└── README.txt
Due Date: 2026/03/18
Points: 10
Make sure to test your code before submission and include all required files!
Grading Rubric
| Component | Points | Criteria |
|---|---|---|
| Part 1 | 2 | Correct loading and display with proper documentation |
| Part 2 | 3 | All transformations implemented correctly |
| Part 3 | 3 | Functions work correctly with edge cases handled |
| Part 4 | 2 | Histograms and equalization implemented properly |
| Total | 10 |
Tips and Resources
- Start early! Image processing can have unexpected challenges
- Test your code with different images
- Use the discussion forum if you get stuck
- Useful resources:
Academic Integrity
You may discuss concepts with classmates but must write your own code. Acknowledge any collaborators in your README.txt file.
Questions?
Post on the discussion forum or come to office hours!