HW2

Due on March 13

  1. This problem aims to get you more familiar with the pinhole camera model and its camera matrix.

    1. (2 points) Please use pickle.load to open this dataset. Describe the data structure in the dataset.

    2. (10 points) Find the camera matrix with the matched coordinates. You can find the detail instructure from the lecture video and slides.

    3. (5 points) Project all data points in the dataset using the computed camera matrix. Plot out your result.

    4. (3 points) What is the location of the camera from the perspective of the world coordinate?

  2. (10 points) Please use two photos of your own (please don't use stock photos) to create a composting image with one side from one image and another side from another image. Please decompose your images into a Laplacian pyramids with 5 levels (Note that the width and height of your images need to be a product of \(2^5=32\). You should resize them otherwise).

    1. Extra credit (5 points). Create a trackbar to vary the number of levels of decomposition as shown in class using the cvui package.

  3. (10 points) Please use the same photos as in Q2 to create a hybrid image (see this). Basically you just need to add a low-pass filtered image of one photo with a high-pass filtered image of another one. The simplest approach is probably approximating a low-pass filter with a Gaussian filter and a complementary high-pass filter with (\(1-\)“Gaussian filter”). That is, we can obtain a high-pass filtered image by subtracting the original image by a low-pass filtered image. Of course, you may also achieve something similar by playing with the fourier transformed images or discrete cosine transformed (DCT) images also.

    1. Extra credit (5 points). Add a trackbar to vary a parameter of the low-pass filter

    2. Extra credit (5 points). Add a trackbar to vary a parameter of the high-pass filter

    3. Extra credit (5 points). Add a trackbar to vary the relative weight of the two images N.B. Feel free to add more trackbars to help adjust the perceptual quality of your outcome.

For all the above questions, please submit a pdf containing

  • the source code

  • the data (photos) you used (if applicable)

  • a screenshot of the output result

Please upload your solution to Canvas before the due date. Please note that we have a strict 5% per late-day penalty as listed on the course website