You will need to download the following files:
image.h
image.cc
Makefile
imagefft.h
- Header file for ComplexFFTImage
class, which has a built-in FFT function.
imagefft.cc
- Related source file.
lab3-skeleton.cc
-
Outline for the source file for all parts of this lab.
You will need the following image files.
top_student.png
- a photo of the best student in ECE 418 Spring 2004.
cat_thoughts.png
- undeniable proof that cats are conspiring to conquer the world.
Use the following instructions to get started.
lab3_skeleton.cc
, naming them lab3a.cc
, lab3b.cc
, and lab3c.cc
.
lab3a.cc
and lab3b.cc
you will be implementing part 1 of this lab (with zero-order hold and bilinear interpolation respectively).
lab3c.cc
you will implement all of part 2 of this lab.
In this lab, you will be using the ComplexFFTImage
class.
This is almost identical to the ComplexImage
class, except it has a built-in FFT function.
For example, if you want to transform the ComplexFFTImage image
you only need to type in:
image.FourierTransform ();
And to reverse the transformation, you only need to type in:
image.InverseFourierTransform ();
Syntax for image interpolation.
User specifies coordinates of top_left_row
and top_left_column
of rectangular region to be enlarged.
Suggested command line usage:
./lab3a top_student.png out_3a.png top_left_row top_left_column
./lab3b top_student.png out_3b.png top_left_row top_left_column
For Image decimation, the suggestion is that you set up your program to use the following syntax:
./lab3c input.png small_output.png restored.png difference.png filter_flag decimation_factor