cvEigenProjection() публичный статический Метод

Calculates an object projection to the eigen sub-space or, in other words, restores an object using previously calculated eigen objects basis, averaged object, and decomposition coefficients of the restored object.
public static cvEigenProjection ( IntPtr inputVecs, float coeffs, IntPtr avg, IntPtr proj ) : void
inputVecs IntPtr Pointer to either an array of IplImage input objects or to a callback function, depending on io_flags
coeffs float Previously calculated decomposition coefficients
avg IntPtr Average vector
proj IntPtr Projection to the eigen sub-space
Результат void
Пример #1
0
        /// <summary>
        /// Given the eigen value, reconstruct the projected image
        /// </summary>
        /// <param name="eigenValue">The eigen values</param>
        /// <returns>The projected image</returns>
        public Image <Gray, byte> EigenProjection(float[] eigenValue)
        {
            Image <Gray, byte> res = new Image <Gray, byte>(AverageImage.Width, AverageImage.Height);
            var inputVecs          = Array.ConvertAll(EigenImages, (Image <Gray, float> img) => img.Ptr);

            CvInvoke.cvEigenProjection(inputVecs, eigenValue, AverageImage.Ptr, res.Ptr);
            return(res);
        }
        /// <summary>
        /// Given the eigen value, reconstruct the projected image
        /// </summary>
        /// <param name="eigenValue">The eigen values</param>
        /// <returns>The projected image</returns>
        public Image <Gray, Byte> EigenProjection(float[] eigenValue)
        {
            Image <Gray, Byte> res = new Image <Gray, byte>(_avgImage.Width, _avgImage.Height);

            CvInvoke.cvEigenProjection(
                Array.ConvertAll <Image <Gray, Single>, IntPtr>(_eigenImages, delegate(Image <Gray, Single> img) { return(img.Ptr); }),
                eigenValue,
                _avgImage.Ptr,
                res.Ptr);
            return(res);
        }
Пример #3
0
 /// <summary>
 /// Calculates an object projection to the eigen sub-space or, in other words, restores an object using previously calculated eigen objects basis, averaged object, and decomposition coefficients of the restored object.
 /// </summary>
 /// <param name="inputVecs">Pointer to either an array of IplImage input objects or to a callback function, depending on io_flags</param>
 /// <param name="coeffs">Previously calculated decomposition coefficients</param>
 /// <param name="avg">Average vector</param>
 /// <param name="proj">Projection to the eigen sub-space</param>
 public static void cvEigenProjection(
     IntPtr[] inputVecs,
     float[] coeffs,
     IntPtr avg,
     IntPtr proj)
 {
     CvInvoke.cvEigenProjection(
         inputVecs,
         inputVecs.Length,
         CvEnum.EIGOBJ_TYPE.CV_EIGOBJ_NO_CALLBACK,
         IntPtr.Zero,
         coeffs,
         avg,
         proj);
 }