private void SetHuInvariants(NativeChannelMoments nativeInstance)
    {
      _HuInvariants = new double[8];

      for (int i = 0; i < 8; i++)
        _HuInvariants[i] = nativeInstance.GetHuInvariants(i);
    }
        private void SetHuInvariants(NativeChannelMoments nativeInstance)
        {
            _huInvariants = new double[8];

            for (int i = 0; i < 8; i++)
            {
                _huInvariants[i] = nativeInstance.GetHuInvariants(i);
            }
        }
Exemple #3
0
        private static double[] GetHuInvariants(NativeChannelMoments nativeInstance)
        {
            var huInvariants = new double[8];

            for (int i = 0; i < 8; i++)
            {
                huInvariants[i] = nativeInstance.GetHuInvariants(i);
            }

            return(huInvariants);
        }
    private ChannelMoments(PixelChannel channel, IntPtr instance)
    {
      Channel = channel;

      NativeChannelMoments nativeInstance = new NativeChannelMoments(instance);
      Centroid = PointD.FromPointInfo(nativeInstance.Centroid);
      EllipseAngle = nativeInstance.EllipseAngle;
      EllipseAxis = PointD.FromPointInfo(nativeInstance.EllipseAxis);
      EllipseEccentricity = nativeInstance.EllipseEccentricity;
      EllipseIntensity = nativeInstance.EllipseIntensity;
      SetHuInvariants(nativeInstance);
    }
        private ChannelMoments(PixelChannel channel, IntPtr instance)
        {
            Channel = channel;

            NativeChannelMoments nativeInstance = new NativeChannelMoments(instance);

            Centroid            = nativeInstance.Centroid.ToPointD();
            EllipseAngle        = nativeInstance.EllipseAngle;
            EllipseAxis         = nativeInstance.EllipseAxis.ToPointD();
            EllipseEccentricity = nativeInstance.EllipseEccentricity;
            EllipseIntensity    = nativeInstance.EllipseIntensity;
            SetHuInvariants(nativeInstance);
        }