DEPARTMENT OF COMPUTING

CS 3005: Programming in C++

Image Filters

This assignment requires extending the text-based application for working with images. You will now be able to filter images using some grayscale filters, and adding some primitive 2D shapes.

Assignment

In this assignment, you will update the program from the previous assignments to allow the user to create PPM images by filtering images with grayscale conversions, and by adding geometric shapes to images. All of the previous assignment’s functionality will remain intact.

The linear colorimetric conversion formula is: brightness = 0.2126*red + 0.7152*green + 0.0722*blue.

Programming Requirements

The following files must be updated or created and stored in the src directory of your repository.

Make changes as described below.

Update PPM.{h,cpp}

The following methods must be declared and implemented for the PPM class.

Update image_menu.h add image_filters.cpp

The follow functions must be declared and implemented.

Update image_menu.h add image_drawing.cpp

The follow functions must be declared and implemented.

Update controllers.cpp

The following functions will require updates to their implementations.

Table of New Commands

Command Name Function Name Description
red-gray grayFromRed Set output image by grayscale from red on input image 1.
green-gray grayFromGreen Set output image by grayscale from green on input image 1.
blue-gray grayFromBlue Set output image by grayscale from blue on input image 1.
linear-gray grayFromLinearColorimetric Set output image by linear colorimetric grayscale on input image 1.
circle drawCircle Draw a circle shape in input image 1.
box drawBox Draw a box shape in input image 1.

Update Makefile

This file must now also include a rule for clean. The following commands should work correctly.

Additional Documentation

Sample PPM Images

Show Off Your Work

To receive credit for this assignment, you must

Additionally, the program must build, run and give correct output.

Extra Challenges (Not Required)

Last Updated 09/11/2023