Sale!

# ECE4076 Computer Vision Lab 3

\$30.00

Category:

## Description

Rate this product

ECE4076 Computer Vision
Lab 3 (Weeks 7,8): Image stitching by homography
complete if you can demonstrate a working program and show understanding of the underlying concepts. Note
In this laboratory exercise, you will create a program that stitches two images with known homography into a
single wide-angle image using bilinear interpolation.
References:
Lecture 7 slides (Homography section)
Resources:
Input images: left.jpg, right.jpg
Task 1: Draw test points on left image
Draw the following points onto the left image as red crosses. Display the resulting image.
{338,197,1}, {468,290,1}, {253,170,1}, {263,256,1}, {242,136,1}
Recall from lectures that these 3-element homogeneous coordinates can be transformed to 2D image pixel
coordinates by dividing the first and second elements by the third (needed for later tasks).
Task 2: Use Homography to find right image points
The following homography transforms pixel coordinates between the left and right images as xr = H*xl
H =
1.6010 -0.0300 -317.9341
0.1279 1.5325 -22.5847
0.0007 0 1.2865
Apply the homography to transform the left image points in Task 1 to the corresponding locations in the right
image. Draw the transformed points as red crosses. Check your result before moving on.
Task 3: Bilinear interpolation of the right image
The transformed coordinates via homography can be in between pixel locations. Write a bilinear interpolation
function to compute the intensity of the transformed pixel coordinate in right.jpg using intensity values from
neighbouring pixel locations. Print the interpolated intensity value for each transformed point in Task 2. The first
point should be around 67 whereas the last point should be around 58.
HINT: The bilinear interpolation function should take the transformed pixel coordinate and the intensity values of
its four neighbours as input arguments, and should output the interpolated intensity value.
Background info: http://en.wikipedia.org/wiki/Bilinear_interpolation
ECE4076 Computer Vision
Create a 1024×384 (width x height) image and fill the LHS with the left image. This stitched image will use the left
image coordinate system (xl) throughout the stitching process.
Next, fill in the remaining 512×384 pixels on the RHS by transforming their pixel coordinates (left image
coordinates) to the right image coordinates via the homography from Task 2. Sample the right image to fill in the
missing parts of the stitched image pixel-by-pixel as follows:
1) If the right pixel coordinate is valid, generate the pixel value using bilinear interpolation
2) If the right pixel coordinate is invalid, use a pixel value of zero
Display the stitching results. It should look like a wide-angle image with a visible seam where the two images join.