Answered step by step
Verified Expert Solution
Question
1 Approved Answer
we will explore PCA as a visualization tool for Yale Face Database. Download the .m files and the database. Extract the face image files
we will explore PCA as a visualization tool for Yale Face Database. Download the .m files and the database. Extract the face image files into a folder named yalefaces and put the .m files at the same level of the folder. Call this folder "problem_pca_face/". Open Matlab, change your "Current Folder" to "problem_pca_face/", and open main_pca_visualization.m. a) Run the code corresponding to this part only, describe the data structure of variable img_buffer. Set preview_img_flag to 1, re-run the code to visually inspect the whole database. b) Complete Matlab function [V, Lambda_mat] = PcaViaKlt (data) by implementing PCA using eigendecomposition on a sample covariance matrix of the face data. The detailed information about the input and outputs are given in the comments of the incomplete function. You may use built-in function eig for eigendecomposition. If your implementation is correct, after running the code of b), you will obtain a plot similar to the following. 6 5 4 239 2 1 0 5 0000000000000000 10 15 Index of sorted {} 20 25 c) Run the code of c) to visualize a few dominating eigenvectors. Comment on whether they reflect some characteristics of the faces you saw in a). d) The code of d) projects each face image (coming from one of the four selected classes) onto a 2D space. Comment on PCA's data visualization performance in this specific example.
Step by Step Solution
★★★★★
3.42 Rating (152 Votes )
There are 3 Steps involved in it
Step: 1
a Data structure of variable imgbuffer The variable imgbuffer is a 3D array where the first dimension represents the number of images in the database ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started