这是一个美国的Matlab代做，主要与数字图像处理相关

## General Instructions:

1. Read Homework Guidelines and MATLAB Function Guidelines for the information about homework

programming, write-up and submission.

2. If you make any assumptions about a problem, please clearly state them in your report.

3. You need to understand the USC policy on academic integrity and penalties for cheating and

plagiarism. These rules will be strictly enforced.

In the first two problems, you will apply geometric modification and spatial warping techniques to do

some interesting image processing tricks. During this process, you may need to solve some linear

equations to get the matrix parameters.

## Problem 1: Geometric Image Modification (25%)

Design and implement a spatial warping technique that transforms an input square image into an output

image of a star-shaped image, out of the square image. An example is given in Figure 1.

The warped image should satisfy the following requirements:

• Pixels that lie on boundaries of the square should still lie on the boundaries of the star.

• Pixels on the two diagonals of the square should remain where they are.

• The thickness (height) of each black arc region is 64 pixels.

Apply the same developed spatial warping algorithm to Forky and Twenty-two images in Figure 2.

(1) Describe your approach as clearly as possible and show the resulting images.

(2) Apply the reverse spatial warping to each warped image to recover its original image.

(3) Compare the recovered square image with the original square image. Is there any difference between

two images? If any, explain sources of distortion in detail.

## Problem 2: Homographic Transformation and Image Stitching (25%)

One can use homographic transformation and image stitching techniques to create panorama that

consisting of multiple images. One example (Taken from MATLAB examples [1]) is shown in Figure 3.

The left images were taken with an uncalibrated smart phone camera by sweeping the camera from left to

right along the horizon to capture all parts of the building. The right panorama is the desired output by

stitching transformed images.

This example involves five images. However, the basic principle is to process in

terms of consecutive pair of images. It could be achieved by following these steps:

• Select control points from both images. You can use SIFT/SURF to detect control points. You

are allowed to use OpenCV or other open source code for selecting control points, online source

refer to [2].

• Apply homographic transformation to find a homograph mapping (described below).

• Warp one image onto the other using the estimated transformation.

• Create a new image big enough to hold the panorama and composite the warped image into it.

You can composite by simply averaging the pixel values where the two images overlap.

The homographic transformation procedure is stated below. Images of points in a plane, from

two different camera viewpoints, under perspective projection (pin hole camera models) are

related by a homography: