Exemple #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));
        }
Exemple #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)));
            }
        }
Exemple #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));
            }
        }
Exemple #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));
        }
Exemple #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));
        }