Esempio n. 1
0
        /// <summary>
        /// CV_NODE_VAL
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="mat"></param>
        /// <param name="node"></param>
        /// <returns></returns>
#else
        /// <summary>
        /// CV_NODE_VAL
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="mat"></param>
        /// <param name="node"></param>
        /// <returns></returns>
#endif
        public static T NODE_VAL <T>(CvSparseMat mat, CvSparseNode node) where T : struct
        {
            if (mat == null)
            {
                throw new ArgumentNullException("mat");
            }
            if (node == null)
            {
                throw new ArgumentNullException("node");
            }

            IntPtr p = NODE_VAL(mat, node);

            return(Util.ToObject <T>(p));
        }
Esempio n. 2
0
        /// <summary>
        /// CV_NODE_VAL
        /// </summary>
        /// <param name="mat"></param>
        /// <param name="node"></param>
        /// <returns></returns>
#else
        /// <summary>
        /// CV_NODE_VAL
        /// </summary>
        /// <param name="mat"></param>
        /// <param name="node"></param>
        /// <returns></returns>
#endif
        public static IntPtr NODE_VAL(CvSparseMat mat, CvSparseNode node)
        {
            if (mat == null)
            {
                throw new ArgumentNullException("mat");
            }
            if (node == null)
            {
                throw new ArgumentNullException("node");
            }

            unsafe
            {
                return(new IntPtr(((byte *)node.CvPtr + mat.ValOffset)));
            }
        }
Esempio n. 3
0
        /// <summary>
        /// CV_NODE_IDX
        /// </summary>
        /// <param name="mat"></param>
        /// <param name="node"></param>
        /// <returns></returns>
#else
        /// <summary>
        /// CV_NODE_IDX
        /// </summary>
        /// <param name="mat"></param>
        /// <param name="node"></param>
        /// <returns></returns>
#endif
        public static PointerAccessor1D_Int32 NODE_IDX(CvSparseMat mat, CvSparseNode node)
        {
            if (mat == null)
            {
                throw new ArgumentNullException("mat");
            }
            if (node == null)
            {
                throw new ArgumentNullException("node");
            }

            unsafe
            {
                int *p = (int *)((byte *)node.CvPtr + mat.IdxOffset);
                return(new PointerAccessor1D_Int32(p));
            }
        }
Esempio n. 4
0
        /// <summary>
        /// CV_NODE_VAL
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="node"></param>
        /// <returns></returns>
#else
        /// <summary>
        /// CV_NODE_VAL
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="node"></param>
        /// <returns></returns>
#endif
        public T NodeVal <T>(CvSparseNode node) where T : struct
        {
            return(Cv.NODE_VAL <T>(this, node));
        }
Esempio n. 5
0
        /// <summary>
        /// CV_NODE_IDX
        /// </summary>
        /// <param name="node"></param>
        /// <returns></returns>
#else
        /// <summary>
        /// CV_NODE_IDX
        /// </summary>
        /// <param name="node"></param>
        /// <returns></returns>
#endif
        public PointerAccessor1D_Int32 NodeIdx(CvSparseNode node)
        {
            return(Cv.NODE_IDX(this, node));
        }