CIS 441/541 Project 1
Image Differencer
The correct image outputs for the sub-projects of Project 1 are available.
This image differencing program can help you verify that your images are
correct.
Directions:
- Make a directory called "differencer"
- Download the file differencer.cxx
- Download the CMakeLists.txt file:
- Run CMake in the differencer directory.
- Modify differencer.cxx to point to the two images you want to compare.
- Compile the program.
- Run the program.
- The program will (i) congratulate you, or (ii) tell you the images are not the same size, or (iii) output a difference map.
Project #1A
- Here is the PDF of the instructions.
- Here is the correct answer.
- CMakeLists.txt file:
- Here is a beginning VTK program.
Project #1B
- Here is the PDF of the instructions.
- Here is the correct answer.
- CMakeLists.txt file: re-use your file from 1A and replace all instances of 1A with 1B
- Here is a beginning VTK program.
Project #1C
- Here is the PDF of the instructions.
- Here is the correct answer.
- CMakeLists.txt file: re-use your file from 1B and replace all instances of 1B with 1C
- Here is a routine to read the triangles from a file.
- Here is the data file that contains the triangle.
- Debugging help: "
- Here is a file that contains the triangle IDs deposited into each pixel.
- Here is a file that contains the splits for the first 100 triangles and the resulting rasterization.
- Here is the image with just the going right triangles. (Note: looks like going left??)
- Here is the image with just the going left triangles. (Note: looks like going right??)
Project #1D
- Here is the PDF of the instructions.
- Here is the correct answer.
- CMakeLists.txt file: re-use your file from 1D and replace all instances of 1C with 1D
- Here is a routine to read the triangles from a file.
- Here is the data file that contains the triangle.
- Here are print statements for the first ten triangles.
- Here are the triangle IDs, colors, and Z's for each pixel.
Project #1E
- Here is the PDF of the instructions.
- Here is a function that will generate triangles.
- The function reads triangles from a file. Here is the file it needs. It is 9MB.
- You are welcome to use my Matrix class.
- You will need the Camera class, and the function GetCamera().
- Here is the correct answer for GetCamera(0,1000).
- Here is the correct answer for GetCamera(250,1000).
- Here is the correct answer for GetCamera(500,1000).
- Here is the correct answer for GetCamera(750,1000).
- Debugging: triangle IDs, colors, and z-buffer for each pixel for frame
000,
250,
500,
750.
Project #1F
- Here is the PDF of the instructions.
- Here is the movie you are supposed to make.
- Here is the file it needs. You can re-use your GetTriangles routine from 1E, but change "proj1e_geometry" to be "proj1f_geometry"
- There are many lighting parameters, so I put them in a struct. You can access the struct here. Also note that the lighting position changes for each camera, so you should use the function "GetLighting" for each camera position. "GetLighting" is also in this file.
- Debugging info for GetCamera(0, 1000):
- Re-use your CMake from before, and rename your project1E.cxx file to be project1F.cxx