FFTs in Graphics and Vision
600.660
Assignment 3

Due: Sunday (05/05/19)

The code base (including Makefile and Visual Studios solution file) can be found here.

Before implementing assignment 3, be sure to go to the Resources and Code Description page for tools, data-sets, and descriptions of some of the subtleties of indexing you will need to know about.

To assist you in the implementation of the assignment, an archive of executables has been compiled, containing working implementations of the code.


  1. Laplacian Smoothing: For this part of the assignment, you will implement code that takes in a spherical function and performs Laplacian smoothing on it.

    To help you on your way, a starting code stub is provided for you in SmoothS2.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 function, a smoothing parameter specifying the extent of the smoothing, and the name of the file to which the output will be written:

    % SmoothS2 --in input.sgrid --smooth <smoothing value> --out output.sgrid

    To implement the smoothing, you can take an approach of solving the heat equation -- obtaining a spherical function for every point in time. In this context, the smoothing value corresponds to the time step at which you grab the smoothed function from the animation.

  2. Axial Symmetry Detection: For this part of the assignment, you will implement code that takes in a spherical function and computes the axial symmetry descriptor (using just the spherical harmonic transform and not the Wigner D-transform).

    To help you on your way, a starting code stub is provided for you in AxialS2.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 function, and the name of the file to which axial symmetry descriptor should be written:

    % AxialS2 --in input.sgrid --out output.sgrid
    To implement the axial symmetry detection you will need to compute the spherical harmonic decomposition of the function. Then, you can set the values of the axial symmetry descriptor by summing the weighted sum of the squares of the different frequency components.

  3. Spherical Function Alignment: For this part of the assignment, you will implement code that takes in a source and target spherical function and aligns the source to the target, writing out the aligned model.

    To help you on your way, a starting code stub is provided for you in AlignS2.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 source and target functions, and the name of the file to which the rotated source function should be written:

    % AlignS2 --source source.sgrid --target target.sgrid --out source.transformed.sgrid
    To implement the alignment, you will need to compute correlation table, giving the dot-product of the target function with every rotation of the source function. You can do this by appropriately setting the Wigner D-coefficients in the FourierKeySO3 class and then calling the WignerTransform::InverseFourier method. Once you get the table, you will need to find the index of the rotation maximizing the correlation value and set 3x3 rotation matrix corresponding to this index.

  4. Spherical Symmetry Detection: For this part of the assignment, you will implement code that takes in a spherical function and computes the reflective and rotational symmetries of the function.

    To help you on your way, a starting code stub is provided for you in SymmetryS2.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 function, the header for the files to which the symmetry descriptors should be written, and the types of symmetries to be computed:

    % SymmetryS2 --in source.sgrid --out header [--axial] [--ref] [--rot <maxK>]

    To implement the alignment, you will need to compute correlation table, giving the dot-product of the target function with every rotation of the source function. For the rotational and axial symmetries, this will just be the array of auto-correlation values. For the reflective symmetries, you will probably want to use the values of the correlation of the function with its image under antipodal mapping.
    Implementing axial symmetry detection can be done by computing the k-fold symmetry descriptor with k set to the resolution of the SphericalGrid. Note that the results of computing the axial symmetry descriptor in this way should be (nearly) the same as the result that you get from running AxialS2