C++ with LAPACK
EENG 4350/5340: Project 3
Assigned: June 29,2015 Due: July 10, 2015
Rules
• Use C or C++ with BLAS/LAPACK for completion of this assignment.
• Produce a LATEX-generated PDF of your report.
• Ask plenty of questions to ensure you have a good understanding of the project.
• The code (and reports) should look vastly different for different groups. Very similar code will incur a hefty penalty.
• Everyone must participate in the project!!! An average peer review grade lower than 70 will result in a 10 point deduction on your grade.
Part 1
1. Research and experiment with LAPACK eigenvalue routines.
2. Perform the following operations:
• Construct two symmetric 5 × 5 matrices whose entries are distributed N(−1, 1). • Perform an eigendecomposition on these matrices, that is find matrices U and Λ such that A = UΛU−1
• Show that your eigendecompsition is correct using appropriate matrix-matrix multiplica- tion routines.
3. Carefully display the matrices and the result of the multiplication.
Part 2
1. Research OpenCV.
2. Get OpenCV running on your platform of choice or get an account on scorpion.
3. Experiment with OpenCV
4. Use OpenCV to read the image file cameraman.jpg into an appropriate two-dimensional array
5. Write a routine to flatten the two-dimensional array you have obtained and perform an SVD.
1
6. Reconstruct and display the image using
A = N−1∑ i=0
σiuiv T i
for values N = 5, 20, 70, 100. Be sure to label each figure with the singular values represented in the image.
Page 2