Project 3: Replacing the banner in the skating rink.

In this project we had to replace the "Baileys" banner in the original video with some other banner that we create. This should be done without removing any other objects in the image. This is the original video given to us. 

I started off by generating a flat image of the original banner. I did this by using the principal of homography. Once I decide the size of the flat image, I can map the corner points to the corner points of the generated image and get the homography between them. Since all the other points in the image are on the same plane, I can project the other points onto my image.

Once I have the image, I have to put this into the video. This is nothing but another homography. So, I had to figure out the corners of the banner in the images, get the homography relating them and project the points of my new image using the homography. I had to be careful about the head of the person. I tried to preserve the head by looking at small portions of the image from the video and comparing it with the "Baileys" image I had generated. After a lot of trial-and-error, I gave a threshold value to find out any color other than that of the banner background and not overwrite that pixel. Whenever I find a match, I replace it with the corresponding pixel from the new image I generated.

This link shows the video I generated.

 

PS: The videos take time to load as they are quite big. That is the reason I have them on separate pages.