示例#1
0
        public static Pixa pixaThinConnected(this Pixa pixas, ThinningFlags type, int connectivity, int maxiters)
        {
            if (null == pixas)
            {
                throw new ArgumentNullException("pixas cannot be null.");
            }

            var pointer = Native.DllImports.pixaThinConnected((HandleRef)pixas, (int)type, connectivity, maxiters);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Pixa(pointer));
            }
        }
示例#2
0
        public static Pix pixThinConnectedBySet(this Pix pixs, ThinningFlags type, Sela sela, int maxiters)
        {
            if (null == pixs ||
                null == sela)
            {
                throw new ArgumentNullException("pixs, sela cannot be null.");
            }

            var pointer = Native.DllImports.pixThinConnectedBySet((HandleRef)pixs, (int)type, (HandleRef)sela, maxiters);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Pix(pointer));
            }
        }