I am using OpenCV to develop a computer vision application. Last night, I woke up in the middle of the night and tried to debug the method which I do PCA (Principal Component Analysis) and calculating the EigentObject.
But when I run cvCalcEigenObject() method from the cvaux library, the application crashed with memory error. I tried to solve this problem for a few hours and finally find out that images that I used for calculation of Eigen object have different height and width (in pixels). It should be same size and width to run the cvCalcEigenObject() correctly. I tried to adjust the image size and the problem was gone without changing a single line of code.