Assignment 3A: Image Warping (or fun with frames)

Due Tues, March 30 (100 pts)

+=

Images by THEfunkyman on flickr.com

Overview

In this assignment you will experiment with computing and applying image transformations using matlab. Example input to your method will be two file names denoting a target image (left), and source image (center). Output will be something like the result image (right) where part of the source image has been warped to fit within the frame in the target image.

Part 1 (20 pts)

Implement a wrapper function, wrapper(targetfilename,sourcefilename,resultfilename), that takes three file names as input: targetfilename specifies the target image (left), sourcefilename specifies the source image (center), resultfilename specifies where to save the result (right).

This function should:

Useful matlab functions for this part are imread, ginput, floor, ceil, round. As always use help in matlab to get descriptions of each function (or look them up on google).

Part 2 (65 pts)

Implement a function, frameit(targetimg,sourceimg,targetx,targety,sourcex,sourcey,resultfilename) that takes as input the images read in by wrapper.m, the x, and y locations of the points clicked on by the user for the source and target images, and the file name for where to save the resulting merged image.

This function should:

Useful matlab functions for this part are cp2tform, imtransform, imresize, min, max. As always use help in matlab to get descriptions of each function (or look them up on google).

Part 3 (15 pts)

Start with the example images I have provided: Target Image, Source Image to test out your code. Now, find or capture your own images, and play around with making interesting combinations. You should run your code on at least 5 different pairs of images. Here points will be given for inventiveness. Display your image triples (source, target, result) in a webpage, results.html.

What to turn in