› Forums › Python › MIT 6.100L PS5 Explained: Image Steganography, Watermarking, and Professional Submission Workflow
- This topic is empty.
-
AuthorPosts
-
February 8, 2026 at 4:12 pm #6026
📌 Context (Initial Code and Purpose)
In MIT 6.100L / MITx Problem Set 5, students work with image filtering and steganography. The assignment requires you to:
- Apply filters to images
- Recover hidden black-and-white and color images
- Add a Kerberos watermark
- Combine outputs into a single PDF
- Submit your work correctly
A simplified example of the recovery code is:
from PIL import Image def extract_end_bits(num_bits, pixel): return pixel % (2 ** num_bits) def reveal_color_image(filename): img = Image.open(filename) width, height = img.size pixels = img.load() secret_img = Image.new("RGB", (width, height)) secret_pixels = secret_img.load() scale = 255 // 7 for x in range(width): for y in range(height): r, g, b = pixels[x, y] secret_r = extract_end_bits(3, r) * scale secret_g = extract_end_bits(3, g) * scale secret_b = extract_end_bits(3, b) * scale secret_pixels[x, y] = (secret_r, secret_g, secret_b) return secret_imgThis code extracts hidden color information and rebuilds a secret image.
✅ Q&A: Purpose and Complete Process of the Exercise
❓ Q1: What is the main purpose of this exercise?
✅ Answer:
The main purpose is to verify that you understand:- image representation
- bit manipulation
- steganography
- RGB processing
- professional submission practices
It is designed to test both technical and practical skills, not just to collect files.
❓ Q2: Is this exercise only about steganography?
✅ Answer:
No. It integrates multiple core concepts:- digital signal processing
- binary data handling
- image reconstruction
- software testing
- documentation and packaging
Steganography is used as the main applied topic.
❓ Q3: What is the complete step-by-step process for this assignment?
✅ Answer:
The full workflow consists of six main steps:
▶ Step 1: Create the Filtered Image
You apply an image filter and generate:
filtered_image_15.pngThis confirms your understanding of convolution and neighborhood processing.
▶ Step 2: Recover the Black-and-White Hidden Image
You extract 1 LSB from each pixel of
hidden1.bmpand rebuild:hidden1_unhidden.bmpThis tests basic steganography.
▶ Step 3: Recover the Color Hidden Image
You extract 3 LSBs from each RGB channel of
hidden2.bmpand rebuild:hidden2_unhidden.bmpThis tests advanced multi-channel steganography.
▶ Step 4: Add Your Kerberos Watermark
You watermark each image using:
draw_kerb(filename, kerberos)Example:
draw_kerb("filtered_image_15.png", "your_kerberos")This generates files ending with
_kerb.
▶ Step 5: Combine All Images into One PDF
After watermarking, you will have three files like:
filtered_image_15_kerb.png hidden1_unhidden_kerb.bmp hidden2_unhidden_kerb.bmpThese must be combined into one PDF.
✅ Method A: Using Python (Recommended)
from PIL import Image images = [ Image.open("filtered_image_15_kerb.png").convert("RGB"), Image.open("hidden1_unhidden_kerb.bmp").convert("RGB"), Image.open("hidden2_unhidden_kerb.bmp").convert("RGB") ] images[0].save( "submission.pdf", save_all=True, append_images=images[1:] )This creates:
submission.pdf
✅ Method B: Using an Online PDF Combiner
You may also use tools like:
- SmallPDF
- iLovePDF
- Adobe PDF tools
Upload the three
_kerbimages and download the combined PDF.
▶ Step 6: Prepare for Autograder Submission
Before submitting, comment out watermark calls:
# draw_kerb("filtered_image_15.png", "your_kerberos") # draw_kerb("hidden1_unhidden.bmp", "your_kerberos") # draw_kerb("hidden2_unhidden.bmp", "your_kerberos")Then submit:
ps5.pysubmission.pdf
❓ Q4: Why is combining images into a PDF important?
✅ Answer:
Combining images into one PDF:- ensures completeness
- standardizes format
- simplifies grading
- prevents missing files
It also reflects professional reporting standards.
❓ Q5: What real-world skills does this workflow teach?
✅ Answer:
This assignment builds skills in:- computer vision
- cybersecurity
- digital forensics
- data engineering
- technical documentation
It trains students to deliver not just code, but complete, verified results.
🌐 Official MITx / Course Reference
You can find the official course material and Problem Set 5 here:
👉 MIT OpenCourseWare – 6.100L (Fall 2022)
https://ocw.mit.edu/courses/6-100l-introduction-to-cs-and-programming-using-python-fall-2022/👉 Problem Set 5 PDF
https://ocw.mit.edu/courses/6-100l-introduction-to-cs-and-programming-using-python-fall-2022/resources/mit6_100l_f22_ps5/
✅ Final Takeaway
This exercise trains you to work with digital images at the bit and pixel level, verify authorship through watermarking, and package technical results into a professional submission format. It reflects real-world software and data-engineering workflows, not just academic grading requirements.
-
AuthorPosts
- You must be logged in to reply to this topic.

