Topic: | Math@UNC environment |
Post date: | May 18, 2020 |
Due date: | May 19, 2020 |
This homework investigates the matrix fundamental spaces, and the concept of linear dependence and independence.
Is the zero vector a linear combination of any non-empty set of vectors?
If , with a vector space then span() equals the intersection of all subspaces of that contain .
Can a vector space have more than one basis?
Must a vector space have a finite basis.
Images are often processed using techniques from linear algebra. In this assignment a database of facial images from MIT will be used to investigate the fundamental vector subspaces associated with a matrix (linear mapping) and concepts of linear dependence. The database is available in a format readily loaded into Octave, with gray-scale images stored as column vectors of a matrix There are images, each with pixels, and the two-dimensional image size in pixels is . The images have been pre-processed to remove non-uniform background illumination, noise, off-centering, different face size, and also been scaled such that the norm of each column vector is equal to one. The resulting images represent common facial features, but may seem distant from the much more detailed processing of visual information that leads a human to recognize a face. After loading the database, a directory is created for this assignment and set as the current directory
octave] |
cd /home/student/courses/MATH547ML/data/faces; load faces |
octave] |
[m,n]=size(A); px=floor(sqrt(m)); py=m/px; disp([m n px py]) |
16384 99 128 128
octave] |
cd /home/student/courses/MATH547ML; |
octave] |
mkdir homework; cd homework; mkdir hw02; cd hw02 |
octave] |
pwd |
ans = /home/student/courses/MATH547ML/homework/hw02
octave] |
Define functions to display a facial image, and save an image to a file.
octave] |
function shwface(a,px,py,save) im=reshape(-a,px,py)'; colormap(gray); imagesc(im); end |
octave] |
shwface(A(:,51),px,py) |
octave] |
function savface(a,px,py,fname) im=reshape(-a,px,py)'; colormap(gray); imagesc(im); print(fname,"-deps"); end |
octave] |
savface(A(:,1),px,py,"face1"); |
octave] |
savface(A(:,2),px,py,"face2"); |
octave] |
savface(A(:,3),px,py,"face3") |
octave] |
|
|||