Based on the traditional canonical correlation analysis (CCA) and two-dimensional canonical correlation analysis (2DCCA), a generalized three dimensional canonical correlation analysis (3DCCA) is proposed. If a three dimensional pattern has a pair of observations (For any pattern space, there has two observation spaces), 3DCCA can find a relevant subspaces of the two observation spaces, in which the projections of the two observations are irrelevant. It can reduce the curse of dimensionality by avoiding the vectorization process and can effectively solve the singular sample covariance matrix problem as well. Finally, our algorithm is validated by the experiments on JAFFE face database. Comparison of other methods, in our method not only the computing complexity is lower, but also the recognition performance is better.