Wednesday, September 26, 2007

r45 - r47 fisherface and lost commit messages

r47 | ozzloy | 2007-09-13 12:54:13 -0700 (Thu, 13 Sep 2007) | 1 line
------------------------------------------------------------------------
r46 | ozzloy | 2007-09-13 12:44:41 -0700 (Thu, 13 Sep 2007) | 1 line
------------------------------------------------------------------------
r45 | ozzloy | 2007-09-13 12:40:11 -0700 (Thu, 13 Sep 2007) | 1 line
adding fisher stuff

i have had some fisherface code lying around for a while. originally it was written with the goal of completing cse152 homework assignments. i reworked the code so that it will work with the picElems i use to represent the images and their metadata.

r42 r43

r43 | ozzloy | 2007-09-12 22:57:16 -0700 (Wed, 12 Sep 2007) | 2 lines

renaming continues for distinguishing between eigen and fisher

------------------------------------------------------------------------
r42 | ozzloy | 2007-09-12 22:49:20 -0700 (Wed, 12 Sep 2007) | 1 line

prepending 'eigen' to filenames to distinguish from fisher

as a result of moving all the functions around and keeping them all in the same directory, i have to rename functions (and therefore the files to which they belong) to make them distinct. of course this means i have to update everywhere the function is called as well. i don't really have a good way of doing this other than using "grep" and looking at each instance to make sure it should be updated to the new name. another possibility is that the function name happens to appear in a comment and should not be updated. sed and awk could probably do this for me more quickly. maybe i will teach myself how to use them.

r41 too many open files

r41 | ozzloy | 2007-09-12 22:36:44 -0700 (Wed, 12 Sep 2007) | 3 lines

currently works for a small number of plots before dying.

oh i hate matlab again. there is some sort of "too many open files" error that is keeping me from using the picture grabbing function i just wrote. i worked out a couple different solutions to this:
the first is to open 1 out of 10 files that i was opening before. this actually made things go quite quickly. unfortunately it wasn't a real solution. the open file count would still max out and cause matlab to crash. at this point i would still have to restart matlab and re-initialize many variables.
i called mathworks and left a message detailing my problem. the next day i got a call back. we discussed the problem and he told me about a way to close all files. i put "fclose('all');" into the place of my code just after where i might have open files. this worked, but it also leads me to believe that the problem is not in my code, but in one of the functions i call, "imread(image_location)". i told the mathworks guy about this and he said he'd look into it. this 'solution' closes all files. that's not exactly what i want to do. right now it seems to be ok. however i can imagine a situation in which i would call this code and it would close all files, causing problems because i can't figure out why my files are closing. basically it's a problem for future users of this code.

r39 database like access to pictures

r39 | ozzloy | 2007-09-12 15:47:23 -0700 (Wed, 12 Sep 2007) | 3 lines

now i can generate a list of complete paths to pictures, saved in a single
variable

i now have a single function that does all the directory traversals. this function takes place of the other find*.m functions. this makes the perl functions obsolete. still, it was fun to learn perl. it acts kinda like a query-able database from the file system. i'm sure there are better ways of doing this, but right now it's a bunch of nested for-loops that iterate over the different possible paths. if no path is specified, it will search for valid paths under the current working directory and make that the new list to iterate over.

r36

r36 | ozzloy | 2007-09-12 14:01:09 -0700 (Wed, 12 Sep 2007) | 3 lines

adding a few more matlab functions so i can start deleting stuff without
worrying

i have created a bunch of matlab scripts that i haven't checked into the repository. when i start writing them, i'm not sure what i will want to keep and put into the repository for me and serge. i have decided that i can just add them and later remove the ones i do not want. still, it would be nice to be able to use a distributed VCS. then i could keep track of those things locally and only put them up for other people when i was certain i wanted to.

r35 initial directory walking in matlab

r35 | ozzloy | 2007-09-12 13:52:43 -0700 (Wed, 12 Sep 2007) | 3 lines

directory walking is now possible entirely in matlab using find*.m

i have completely implemented the ability to search out and grab images off the disk. i have a bunch of find*.m files (egs: "findPPMs.m"). this is better than using the perl in a different directory because i don't have to hardcode the location of the perl scripts. however it does clutter up the current directory with a bunch of find*.m files, which is annoying. also, this makes the work a bit more portable. all i need to do is install matalb on another machine and it should be able to run these scripts.

r34

r34 | ozzloy | 2007-09-04 11:23:13 -0700 (Tue, 04 Sep 2007) | 5 lines

adding the fresh directory. need to delete all *.png
accidentally removed all fresh/out
i'm a doofus

matlab is such a pain. i have not been able to separate functions into packages, and every function must be in its own file. the result is that i have many many files in the current working directory that do many distinct things dealing with distinct concepts. in the same directory i have files that will read images off the disk and files that will calculate the top eigenfaces using fisher's linear discriminant. the only thing i have in a separate directory is the directory traversal which is written in perl and whose locations are hard-coded in the matlab functions. i need to learn to deal with matlab paths. maybe i could have one uber-function in the top directory that loads the paths for everything.