Eigenfaces implementation in java