Return to 4475 website
4475 Project 1: Statufy in Barcelona
Brant Becker
Samantha Dugan
Sadie Martin
The “Statufy in Barcelona” project transforms pictures of people into statues,
and places them in Barcelona. We were inspired to do this project becuase of our history in photoshop, we wanted to understand the certain features photoshop has
that we use so easily everyday. Thus we chose a project that focused on computationally adding a filter, merging two images together, than photoshopping these edited
pictures into a new background.
The project allows an individual to view themselves and
friends if they were statues amid a historic city landscape. To use the program,
various input images are imported to create one output: Three png images of the user,
a stone texture, and a background image.
Meet the poor souls who will be statufied...
Lets add the other components...
+
=
Project's Steps and Outcomes:
The program utilizes one main function, LayerImages, which calls upon different helper functions,
Statueify and Resize. Together, this process creates the produced output from the input images.
- The LayerImages function accepts three png images of any size, a stone texture, and a
background image. It is eventually used to format the product.
- The Resize function is called on each png image, and stores them as objects img1resized,
img2resized, img3resized. This function shapes the horizontal and vertical dimensions of each png image
so that it will fit on the image proportionally to the background, and so that each person is the same size.
- The Statueify function takes in a png image and applies a Sepia Filter (Image Proccessing uing OpenCv Python, Medium).
The Statufy function takes two image files as inputs: a cutout image and a stone_texture image. The goal of the function is to blend these images
in a way that makes the cutout image appear as if it is made of stone.
- For each statueify image, a for loop iterates through every pixel, and evaluates its alpha channel through a conditional.
If the alpha channel indicates the pixel is visible, the background rewrites its color to match the pixel from the statueify image.
This process is repeated at different locations on the background image during each for loop, essentially layering the png
images over the background.
- The edited background image is returned
Colloboartion Statement:
First we would like to acknowledge our permission to be publically identified with the work.
To better understand the components of a png image in cv2, GAI was
utilized to learn more about the alpha channels and how to interpret them.
Additionally for the sepia filter conversion, GAI was utilized to find a filter that
would achieve a ‘statue’ appearance, and how to implement it using code. We also used an online sepia filter and played with the contrast of the image.
Getting ideas for this project we used these two websites.
Image Processing using open cv, Medium.com
Sepia Filter Source