4475 Project 3: Population Projection

Jennifer Grigsby and McKenzie Elliott

High Level Overview

The purpose of our project is to reveal to a viewer the beautiful scenery of Barcelona while reflecting the typical life present in the area. To accomplish this feat, we utilized Photoshop to generate an empty image of a crowded area and used Python to generate an overlay of the busy street life on top of the barren, original scene.

Main Page Main Page

Main Page Main Page

Main Page Main Page

Main Page Main Page

More images can be found in the video above, starting at 1:43.

In Depth Analysis

In order to artistically convey the bustling, daily life of the streets of Barcelona as well as display the beauty of the empty scenery, we utilized the combination of a number of tools that came together to produce our final, resulting images. To begin our project, we used a Nikon D3000 to collect a large number of pictures of a single area in order for us to have the ability to remove the people through Photoshop. Removing the people allowed for us to posses a view of the scenery when no people are present. After Photoshop produced the empty scenery, we used the combination of Gaussian Blurs, fillter2D blurs, and Laplacian pyramids to generate an outline of the key features of the life present within each scene. From there, the outline of typical daily life was overlaid onto the empty scene, combining the stillness of the building’s presence and the people who give it life.

Photoshop Techniques

To get rid of the people moving around in the scene in Photoshop, we went to File --> Scripts --> Statistics --> Median, and then selected all of the photos taken over time (about 20 for each scene). Photoshop then removed the people for us, leaving us with just the background of the scene itself, but it usually was not perfect. Some people didn’t move the entire time we took pictures, which was fine because they ended up being fully visible and not blurry. However, often when people’s line of motion was toward or away from the camera (in the Z direction instead of moving side to side/up and down in the X-Y plane), it confused Photoshop and left weird blurry marks on the image instead of getting rid of people cleanly. This was fixable though, using predominantly the Clone tool (worked really well with regular patterns like sidewalks and cement walls), with help from the Blur (mostly when the Clone tool needed a little bit of blending in to look natural), Dodge/Burn (to lighten/darken areas that needed to look more natural), and Sharpen (mostly for blurry areas on trees because they moved around quite a bit while we photographed) tools as needed.

def blur(imBlur):

The blur() function takes in an image, applies a kernel to the image, and utilizes the filter2D functionality of cv2 in order to blur the image. The purpose of the function to blur the background in order to prepare the image for the outlined overlay to come later in the code. The blur function was constructed using methodology learned in class.

def emboss(imEmboss):

The emboss function takes in an image and applies a kernel across the image in order to highlight the main features of an image through the exercise of an “emboss” texture. Before the image is properly embossed, the bit type must be changed to 16 bit, and after the emboss occurs, the bit type will be altered back to 8 bits. The filter 2D functionality is used in conjunction with the produced kernel in order to create the feature-highlighting effect. The emboss function allows for us to identify the key features and lines that should be overlayed onto the blurred image produced by the blur function.

def lapFOREAL(img):

This function implements a laplacian pyramid over the image after the filter2D has been applied. Originally, we used a Guassian Blur to generate the blur effect, but the Gaussian was not producing the desired effects. Thus, we transitioned to work with a filter 2D blur instead. The blur removes unnecessary extra detail from the image containing people and scene features in order to create the correct style of overlay generated by the laplacian function. The laplacian function works to outline key features present in the original scene with many people in order to create the overlay of scene elements. The kernel used was altered per picture in order to guarantee the best possible overlay.

Finally, the blurred image is added to the Laplacian image in order to be displayed and produce the overlay of the outline of daily life over the image of the empty scenery.

Credit

All code was pulled from previous In Class Assignments, home works, or generated through the guidance of Irfan"s slides provided as resources on the CS 4475 Page of T-Square. Pictures were taken with McKenzie's D300 camera by both Jennifer and McKenzie.