Generalized 2 D Principal Component Analysis