/// <summary>
        /// Caculate the eigen images for the specific traning image
        /// </summary>
        public static void CalcEigenObjects(Bitmap[] trainingImages, int maxIter, double eps, out DoubleImage[] eigenImages, out DoubleImage avg)
        {
            int width  = trainingImages[0].Width;
            int height = trainingImages[0].Height;

            if (maxIter <= 0 || maxIter > trainingImages.Length)
            {
                maxIter = trainingImages.Length;
            }

            int maxEigenObjs = maxIter;

            eigenImages = new DoubleImage[maxEigenObjs];
            for (int i = 0; i < eigenImages.Length; i++)
            {
                eigenImages[i] = new DoubleImage(width, height);
            }

            avg = new DoubleImage(width, height);

            EigenObjects.CalcEigenObjects(trainingImages, maxIter, eps, eigenImages, null, avg);
        }
 /// <summary>
 /// Decompose the image as eigen values, using the specific eigen vectors
 /// </summary>
 public static double[] EigenDecomposite(Bitmap src, DoubleImage[] eigenImages, DoubleImage avg)
 {
     return(EigenObjects.EigenDecomposite(src, eigenImages, avg));
 }