Working with images in C++


Recently, I finished a class on C++ offered by the University of Illinois.  The course can be found on Coursera.





As the final programming project, we were assigned to work with a photo and change the pixels of the photo based on certain conditions. The three tasks were spotlight, illinify and watermark.

I will post various changes to the image in this post and other posts. I will not post the code.

Here is the original image:






Here is the spotlight image assignment:

To spotlight an image is to create a spotlight pattern centered at a given point (centerX, centerY).

A spotlight adjusts the luminance of a pixel based on the distance between the the pixel and the
designated center by decreasing the luminance by 0.5% per 1 pixel unit of Euclidean distance, up to an 80% decrease in luminance at most.


Here is the image needed to pass the assignment:






Here is another image were I adjust the 80% down to 60%:





Here is the image were I adjust the luminance of the center:




Note: I am using Amazon AWS Cloud 9.

Comments

Popular posts from this blog

Space Wars- Python 3

Maze Game in Python using Turtle