当前位置: 首页>>代码示例>>C#>>正文


C# DoubleImage类代码示例

本文整理汇总了C#中DoubleImage的典型用法代码示例。如果您正苦于以下问题:C# DoubleImage类的具体用法?C# DoubleImage怎么用?C# DoubleImage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DoubleImage类属于命名空间,在下文中一共展示了DoubleImage类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CalcEigenObjects

        /// <summary>
        /// Calculates eigen objects
        /// </summary>
        public static void CalcEigenObjects(Bitmap[] input, int maxIteration, double eps, DoubleImage[] eigVecs, double[] eigVals, DoubleImage avg)
        {
            if (input.Length == 0)
                return;

            int nObjects = input.Length;
            int nEigens = nObjects - 1;

            byte[][] objs = new byte[nObjects][];
            double[][] eigs = new double[nEigens][];
            int obj_step = 0, old_step = 0;
            int eig_step = 0, oldeig_step = 0;
            Size obj_size = avg.Size, old_size = avg.Size, oldeig_size = avg.Size;

            for (var i = 0; i < nObjects; i++)
            {
                Bitmap obj = input[i];
                objs[i] = obj.CopyGrayscaleBitmapToByteArray(out obj_step);
                obj_size = obj.Size;

                if (obj_size != avg.Size || obj_size != old_size)
                    throw new EigenObjectException("Different sizes of objects");
                if (i > 0 && obj_step != old_step)
                    throw new EigenObjectException("Different steps of objects");

                old_step = obj_step;
                old_size = obj_size;
            }

            for (var i = 0; i < nEigens; i++)
            {
                DoubleImage eig = eigVecs[i];
                eig_step = eig.Step;
                eigs[i] = eig.Data;

                if (eig.Size != avg.Size || eig.Size != oldeig_size)
                    throw new EigenObjectException("Different sizes of objects");
                if (i > 0 && eig_step != oldeig_step)
                    throw new EigenObjectException("Different steps of objects");

                oldeig_step = eig.Step;
                oldeig_size = eig.Size;
            }

            CalcEigenObjects(nObjects, objs, obj_step,
                                        eigs, eig_step, obj_size,
                                        maxIteration, eps, avg.Data, avg.Step, eigVals);
        }
开发者ID:renato127,项目名称:Sacknet.KinectFacialRecognition,代码行数:51,代码来源:EigenObjects.cs

示例2: CalcEigenObjects

        /// <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);
        }
开发者ID:renato127,项目名称:Sacknet.KinectFacialRecognition,代码行数:21,代码来源:EigenObjectRecognizer.cs

示例3: ClassifyOutputTab

 public double ClassifyOutputTab(DoubleImage image, vector_ClassOutput outputTab) {
   double ret = VisionLabPINVOKE.BPN_ImageClassifier_Double_ClassifyOutputTab(swigCPtr, DoubleImage.getCPtr(image), vector_ClassOutput.getCPtr(outputTab));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
开发者ID:eddiesprietsma,项目名称:licplates11Okt12_b,代码行数:5,代码来源:BPN_ImageClassifier_Double.cs

示例4: TrainImage

 public double TrainImage(double learnRate, double momentum, DoubleImage image, int classNr) {
   double ret = VisionLabPINVOKE.BPN_ImageClassifier_Double_TrainImage(swigCPtr, learnRate, momentum, DoubleImage.getCPtr(image), classNr);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
开发者ID:eddiesprietsma,项目名称:licplates11Okt12_b,代码行数:5,代码来源:BPN_ImageClassifier_Double.cs

示例5: DeInterlace

 public static void DeInterlace(DoubleImage image) {
   VisionLabPINVOKE.DeInterlace__SWIG_6(DoubleImage.getCPtr(image));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
开发者ID:eddiesprietsma,项目名称:licplates11Okt12_b,代码行数:4,代码来源:VisionLab.cs

示例6: CircleShape

 public static void CircleShape(DoubleImage image, XYCoord centre, int r, double value, ZeroOrOriginal zorg) {
   VisionLabPINVOKE.CircleShape__SWIG_12(DoubleImage.getCPtr(image), XYCoord.getCPtr(centre), r, value, (int)zorg);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
开发者ID:eddiesprietsma,项目名称:licplates11Okt12_b,代码行数:4,代码来源:VisionLab.cs

示例7: AddBorder

 public static void AddBorder(DoubleImage src, DoubleImage dest, int top, int left, int right, int bottom, double value) {
   VisionLabPINVOKE.AddBorder__SWIG_6(DoubleImage.getCPtr(src), DoubleImage.getCPtr(dest), top, left, right, bottom, value);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
开发者ID:eddiesprietsma,项目名称:licplates11Okt12_b,代码行数:4,代码来源:VisionLab.cs

示例8: NormaliseHue

 public static void NormaliseHue(HSV888Image src, byte hue, byte minVal, byte minSat, DoubleImage dest, float notNormalised) {
   VisionLabPINVOKE.NormaliseHue__SWIG_2(HSV888Image.getCPtr(src), hue, minVal, minSat, DoubleImage.getCPtr(dest), notNormalised);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
开发者ID:eddiesprietsma,项目名称:licplates11Okt12_b,代码行数:4,代码来源:VisionLab.cs

示例9: ZeroCrossings

 public static void ZeroCrossings(DoubleImage src, DoubleImage dest) {
   VisionLabPINVOKE.ZeroCrossings__SWIG_13(DoubleImage.getCPtr(src), DoubleImage.getCPtr(dest));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
开发者ID:eddiesprietsma,项目名称:licplates11Okt12_b,代码行数:4,代码来源:VisionLab.cs

示例10: VarianceFilter

 public static void VarianceFilter(DoubleImage src, DoubleImage dest, FixEdge edge, Mask_Int32 mask) {
   VisionLabPINVOKE.VarianceFilter__SWIG_6(DoubleImage.getCPtr(src), DoubleImage.getCPtr(dest), (int)edge, Mask_Int32.getCPtr(mask));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
开发者ID:eddiesprietsma,项目名称:licplates11Okt12_b,代码行数:4,代码来源:VisionLab.cs

示例11: SNN_MedianFilter

 public static void SNN_MedianFilter(DoubleImage src, DoubleImage dest, double radius, FixEdge edge) {
   VisionLabPINVOKE.SNN_MedianFilter__SWIG_6(DoubleImage.getCPtr(src), DoubleImage.getCPtr(dest), radius, (int)edge);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
开发者ID:eddiesprietsma,项目名称:licplates11Okt12_b,代码行数:4,代码来源:VisionLab.cs

示例12: NonMaximumSuppression

 public static void NonMaximumSuppression(DoubleImage src, DoubleImage dest, DoubleImage direction, double dirScale) {
   VisionLabPINVOKE.NonMaximumSuppression__SWIG_6(DoubleImage.getCPtr(src), DoubleImage.getCPtr(dest), DoubleImage.getCPtr(direction), dirScale);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
开发者ID:eddiesprietsma,项目名称:licplates11Okt12_b,代码行数:4,代码来源:VisionLab.cs

示例13: LoGFilter

 public static void LoGFilter(DoubleImage image, double sigma) {
   VisionLabPINVOKE.LoGFilter__SWIG_13(DoubleImage.getCPtr(image), sigma);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
开发者ID:eddiesprietsma,项目名称:licplates11Okt12_b,代码行数:4,代码来源:VisionLab.cs

示例14: LocalMinFilter

 public static void LocalMinFilter(DoubleImage src, DoubleImage dest, double backGround, FixEdge edge, Mask_Int32 mask) {
   VisionLabPINVOKE.LocalMinFilter__SWIG_6(DoubleImage.getCPtr(src), DoubleImage.getCPtr(dest), backGround, (int)edge, Mask_Int32.getCPtr(mask));
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
开发者ID:eddiesprietsma,项目名称:licplates11Okt12_b,代码行数:4,代码来源:VisionLab.cs

示例15: InterpolateAtSpecificPixel

 public static void InterpolateAtSpecificPixel(DoubleImage src, DoubleImage dest, double value) {
   VisionLabPINVOKE.InterpolateAtSpecificPixel__SWIG_6(DoubleImage.getCPtr(src), DoubleImage.getCPtr(dest), value);
   if (VisionLabPINVOKE.SWIGPendingException.Pending) throw VisionLabPINVOKE.SWIGPendingException.Retrieve();
 }
开发者ID:eddiesprietsma,项目名称:licplates11Okt12_b,代码行数:4,代码来源:VisionLab.cs


注:本文中的DoubleImage类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。