/// <summary>
 /// Writes data to a file storage.
 /// </summary>
 /// <param name="val"></param>
 public FileStorage Add(Vec4i val)
 {
     ThrowIfDisposed();
     NativeMethods.core_FileStorage_shift_Vec4i(ptr, val);
     GC.KeepAlive(this);
     return(this);
 }
Exemple #2
0
        /// <summary>
        /// Creates a proxy class of the specified Vec*b
        /// </summary>
        /// <param name="vec"></param>
        /// <returns></returns>
        public static InputArray Create(IVec vec)
        {
            if (vec == null)
            {
                throw new ArgumentNullException(nameof(vec));
            }

            return(vec switch
            {
                Vec2b v => new InputArray(new[] { v.Item0, v.Item1 }),
                Vec3b v => new InputArray(new[] { v.Item0, v.Item1, v.Item2 }),
                Vec4b v => new InputArray(new[] { v.Item0, v.Item1, v.Item2, v.Item3 }),
                Vec6b v => new InputArray(new[] { v.Item0, v.Item1, v.Item2, v.Item3, v.Item4, v.Item5 }),
                Vec2s v => new InputArray(new[] { v.Item0, v.Item1 }),
                Vec3s v => new InputArray(new[] { v.Item0, v.Item1, v.Item2 }),
                Vec4s v => new InputArray(new[] { v.Item0, v.Item1, v.Item2, v.Item3 }),
                Vec6s v => new InputArray(new[] { v.Item0, v.Item1, v.Item2, v.Item3, v.Item4, v.Item5 }),
                Vec2w v => new InputArray(new[] { v.Item0, v.Item1 }),
                Vec3w v => new InputArray(new[] { v.Item0, v.Item1, v.Item2 }),
                Vec4w v => new InputArray(new[] { v.Item0, v.Item1, v.Item2, v.Item3 }),
                Vec6w v => new InputArray(new[] { v.Item0, v.Item1, v.Item2, v.Item3, v.Item4, v.Item5 }),
                Vec2i v => new InputArray(new[] { v.Item0, v.Item1 }),
                Vec3i v => new InputArray(new[] { v.Item0, v.Item1, v.Item2 }),
                Vec4i v => new InputArray(new[] { v.Item0, v.Item1, v.Item2, v.Item3 }),
                Vec6i v => new InputArray(new[] { v.Item0, v.Item1, v.Item2, v.Item3, v.Item4, v.Item5 }),
                Vec2f v => new InputArray(new[] { v.Item0, v.Item1 }),
                Vec3f v => new InputArray(new[] { v.Item0, v.Item1, v.Item2 }),
                Vec4f v => new InputArray(new[] { v.Item0, v.Item1, v.Item2, v.Item3 }),
                Vec6f v => new InputArray(new[] { v.Item0, v.Item1, v.Item2, v.Item3, v.Item4, v.Item5 }),
                Vec2d v => new InputArray(new[] { v.Item0, v.Item1 }),
                Vec3d v => new InputArray(new[] { v.Item0, v.Item1, v.Item2 }),
                Vec4d v => new InputArray(new[] { v.Item0, v.Item1, v.Item2, v.Item3 }),
                Vec6d v => new InputArray(new[] { v.Item0, v.Item1, v.Item2, v.Item3, v.Item4, v.Item5 }),
                _ => throw new ArgumentException($"Not supported type: '{vec.GetType().Name}'", nameof(vec))
            });
 /// <summary>
 ///
 /// </summary>
 /// <param name="vec"></param>
 /// <returns></returns>
 public static HierarchyIndex FromVec4i(Vec4i vec)
 {
     return(new HierarchyIndex
     {
         Next = vec.Item0,
         Previous = vec.Item1,
         Child = vec.Item2,
         Parent = vec.Item3
     });
 }
Exemple #4
0
 public static extern void core_Mat_push_back_Vec4i(IntPtr self, Vec4i v);
Exemple #5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="other"></param>
 /// <returns></returns>
 public bool Equals(Vec4i other)
 {
     return(Item0 == other.Item0 && Item1 == other.Item1 && Item2 == other.Item2 && Item3 == other.Item3);
 }
 public static extern ExceptionStatus core_FileNode_read_Vec4i(IntPtr node, out Vec4i returnValue);
Exemple #7
0
 public static extern ExceptionStatus core_FileStorage_shift_Vec4i(IntPtr fs, Vec4i val);
 public static extern ExceptionStatus ximgproc_HoughPoint2Line(
     Point houghPoint, IntPtr srcImgInfo, int angleRange, int makeSkew, int rules, out Vec4i returnValue);
 public static extern ExceptionStatus core_Mat_push_back_Vec4i(IntPtr self, Vec4i v);
 public static extern void core_FileStorage_shift_Vec4i(IntPtr fs, Vec4i val);
Exemple #11
0
 public static void Run(IntPtr ptr, Vec4i v) => NativeMethods.core_Mat_push_back_Vec4i(ptr, v);