FFTs in Graphics and Vision
600.660
Assignment 2

Due: Thursday (03/26/23)
The code base (including Makefile and Visual Studios solution file) can be found here.
  1. Pattern Detection: For this part of the assignment, you will implement code that takes in an image and a pattern and outputs an image whose value at point (x,y) corresponds to the square L2-difference between the image and the pattern shifted by (x,y).

    To help you on your way, a starting code stub is provided for you in PatternDetection2D.cpp. You will need to implement the missing code in the main part of the code.

    To run the code, you need to specify the input image and pattern, and the name of the image to which the output will be written:

    % PatternDetection2D --in input.[jpg/bmp] --patern pattern.[jpg/bmp] --out output.[jpg/bmp]

    As an example, the images below show an input image and pattern and the output L2-difference image:
    Input Image Input Pattern Output Difference Image

  2. Symmetry Detection: For this part of the assignment, you will implement code that takes in an image and computes the reflective and rotational symmetries about the center of the image. The value associated to each symmetry should be the normalized, square L2-norm of the symmetric component of the image.

    To help you on your way, a starting code stub is provided for you in Symmetry2D.cpp. You will need to implement the missing code in the main part of the code.

    To run the code, you need to specify the input image, the type of symmetry, and the name of the image file to which the output will be written:

    Notes: As an example, the images below show an input image and the computed reflective and rotational symmetries (for visualizing the rotational symmetries, the 0-th order Fourier coefficient was not incorporated):
    Input Image Reflective Symmetries Rotational Symmetries

  3. Wave Propagation: For this part of the assignment, you will implement a solution to the wave propagation equation, given initial positions, an assumed initial zero derivative, and periodic boundaries. The output of the code should generate a set of images corresponding to images of the propagating wave at different time-steps.

    To help you on your way, a starting code stub is provided for you in WavePropagation2D.cpp. You will need to implement the missing code in the main part of the code.

    To run the code, you need to specify the input image corresponding to the initial positions, the output file header, the duration of the animation sequences, the number of time-steps, and the file extension to be used for the output images:

    % WavePropagation2D --in input.[jpg/bmp] --out header --duration time --steps time-steps --extension [jpg/bmp]
    Notes: As an example, the images below show the 16 frames of the animation generated by calling:
    % WavePropagation2D --in misha.jpg --out Video\misha --duration 1 --steps 16 --extension jpg