Ejemplo n.º 1
0
        public static Boxaa boxaSort2d(this Boxa boxas, out Numaa pnaad, int delta1, int delta2, int minh1)
        {
            if (null == boxas)
            {
                throw new ArgumentNullException("boxas cannot be null.");
            }

            IntPtr pnaadPtr;
            var    pointer = Native.DllImports.boxaSort2d((HandleRef)boxas, out pnaadPtr, delta1, delta2, minh1);

            if (IntPtr.Zero == pnaadPtr)
            {
                pnaad = null;
            }
            else
            {
                pnaad = new Numaa(pnaadPtr);
            }

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Boxaa(pointer));
            }
        }
Ejemplo n.º 2
0
        public static int numaaGetNumberCount(this Numaa naa)
        {
            if (null == naa)
            {
                throw new ArgumentNullException("naa cannot be null");
            }

            return(Native.DllImports.numaaGetNumberCount((HandleRef)naa));
        }
Ejemplo n.º 3
0
        public static int numaaGetValue(this Numaa naa, int i, int j, out float pfval, out int pival)
        {
            if (null == naa)
            {
                throw new ArgumentNullException("naa cannot be null");
            }

            return(Native.DllImports.numaaGetValue((HandleRef)naa, i, j, out pfval, out pival));
        }
Ejemplo n.º 4
0
        public static int gplotSimpleN(this Numaa naa, int outformat, string outroot, string title)
        {
            if (null == naa)
            {
                throw new ArgumentNullException("naa cannot be null");
            }

            return(Native.DllImports.gplotSimpleN((HandleRef)naa, outformat, outroot, title));
        }
Ejemplo n.º 5
0
        public static int numaaAddNumber(this Numaa naa, int index, float val)
        {
            if (null == naa)
            {
                throw new ArgumentNullException("naa cannot be null");
            }

            return(Native.DllImports.numaaAddNumber((HandleRef)naa, index, val));
        }
Ejemplo n.º 6
0
        public static int gplotSimpleXYN(this Numa nax, Numaa naay, GPLOT_STYLE plotstyle, GPLOT_OUTPUT outformat, string outroot, string title)
        {
            if (null == naay)
            {
                throw new ArgumentNullException("naay cannot be null");
            }

            return(Native.DllImports.gplotSimpleXYN((HandleRef)nax, (HandleRef)naay, (int)plotstyle, (int)outformat, outroot, title));
        }
Ejemplo n.º 7
0
        public static IntPtr numaaGetPtrArray(this Numaa naa)
        {
            if (null == naa)
            {
                throw new ArgumentNullException("naa cannot be null");
            }

            return(Native.DllImports.numaaGetPtrArray((HandleRef)naa));
        }
Ejemplo n.º 8
0
        public static int numaaJoin(this Numaa naad, Numaa naas, int istart, int iend)
        {
            if (null == naad)
            {
                throw new ArgumentNullException("naad cannot be null.");
            }

            return(Native.DllImports.numaaJoin((HandleRef)naad, (HandleRef)naas, istart, iend));
        }
Ejemplo n.º 9
0
        // Add Numa to Numaa
        public static int numaaAddNuma(this Numaa naa, Numa na, AccessAndStorageFlags copyflag)
        {
            if (null == naa ||
                null == na)
            {
                throw new ArgumentNullException("naa, na cannot be null");
            }

            return(Native.DllImports.numaaAddNuma((HandleRef)naa, (HandleRef)na, (int)copyflag));
        }
Ejemplo n.º 10
0
        public static int numaaCompareImagesByBoxes(this Numaa naa1, Numaa naa2, int nperline, int nreq, int maxshiftx, int maxshifty, int delx, int dely, out int psame, int debugflag)
        {
            if (null == naa1 ||
                null == naa2)
            {
                throw new ArgumentNullException("naa1, naa2 cannot be null.");
            }

            return(Native.DllImports.numaaCompareImagesByBoxes((HandleRef)naa1, (HandleRef)naa2, nperline, nreq, maxshiftx, maxshifty, delx, dely, out psame, debugflag));
        }
Ejemplo n.º 11
0
        public static int numaaReplaceNuma(this Numaa naa, int index, Numa na)
        {
            if (null == naa ||
                null == na)
            {
                throw new ArgumentNullException("naa, na cannot be null");
            }

            return(Native.DllImports.numaaReplaceNuma((HandleRef)naa, index, (HandleRef)na));
        }
Ejemplo n.º 12
0
        public static int numaaWriteStream(IntPtr fp, Numaa naa)
        {
            if (IntPtr.Zero == fp ||
                null == naa)
            {
                throw new ArgumentNullException("fp, naa cannot be null");
            }

            return(Native.DllImports.numaaWriteStream(fp, (HandleRef)naa));
        }
Ejemplo n.º 13
0
        public static int numaaWriteMem(out IntPtr pdata, IntPtr psize, Numaa naa)
        {
            if (IntPtr.Zero == psize ||
                null == naa)
            {
                throw new ArgumentNullException("pdata, psize, naa cannot be null");
            }

            return(Native.DllImports.numaaWriteMem(out pdata, psize, (HandleRef)naa));
        }
Ejemplo n.º 14
0
        public static void numaaDestroy(this Numaa pnaa)
        {
            if (null == pnaa)
            {
                throw new ArgumentNullException("pnaa cannot be null");
            }

            var pointer = (IntPtr)pnaa;

            Native.DllImports.boxDestroy(ref pointer);
        }
Ejemplo n.º 15
0
        public static int numaaWrite(string filename, Numaa naa)
        {
            if (string.IsNullOrWhiteSpace(filename))
            {
                throw new ArgumentNullException("filename cannot be null");
            }
            if (null == naa)
            {
                throw new ArgumentNullException("naa cannot be null");
            }

            return(Native.DllImports.numaaWrite(filename, (HandleRef)naa));
        }
Ejemplo n.º 16
0
        public static int pixDecideIfPhotoImage(this Pix pix, int factor, int nx, int ny, float thresh, out Numaa pnaa, Pixa pixadebug)
        {
            if (null == pix)
            {
                throw new ArgumentNullException("pix cannot be null.");
            }

            IntPtr pnaaPtr;
            var    result = Native.DllImports.pixDecideIfPhotoImage((HandleRef)pix, factor, nx, ny, thresh, out pnaaPtr, (HandleRef)pixadebug);

            pnaa = new Numaa(pnaaPtr);

            return(result);
        }
Ejemplo n.º 17
0
        public static int pixGenPhotoHistos(this Pix pixs, Box box, int factor, float thresh, int nx, int ny, out Numaa pnaa, out int pw, out int ph, int debugflag)
        {
            if (null == pixs)
            {
                throw new ArgumentNullException("pixs cannot be null.");
            }

            IntPtr pnaaPtr;
            var    result = Native.DllImports.pixGenPhotoHistos((HandleRef)pixs, (HandleRef)box, factor, thresh, nx, ny, out pnaaPtr, out pw, out ph, debugflag);

            pnaa = new Numaa(pnaaPtr);

            return(result);
        }
Ejemplo n.º 18
0
        // Comparing histograms

        public static int grayHistogramsToEMD(this Numaa naa1, Numaa naa2, out Numa pnad)
        {
            if (null == naa1 ||
                null == naa2)
            {
                throw new ArgumentNullException("naa1, naa2 cannot be null.");
            }

            IntPtr pnadPtr;
            var    result = Native.DllImports.grayHistogramsToEMD((HandleRef)naa1, (HandleRef)naa2, out pnadPtr);

            pnad = new Numa(pnadPtr);

            return(result);
        }
Ejemplo n.º 19
0
        public static int grayInterHistogramStats(this Numaa naa, int wc, out Numa pnam, out Numa pnams, out Numa pnav, out Numa pnarv)
        {
            if (null == naa)
            {
                throw new ArgumentNullException("naa cannot be null.");
            }

            IntPtr pnamPtr, pnamsPtr, pnavPtr, pnarvPtr;
            var    result = Native.DllImports.grayInterHistogramStats((HandleRef)naa, wc, out pnamPtr, out pnamsPtr, out pnavPtr, out pnarvPtr);

            pnam  = new Numa(pnamPtr);
            pnams = new Numa(pnamsPtr);
            pnav  = new Numa(pnavPtr);
            pnarv = new Numa(pnarvPtr);

            return(result);
        }
Ejemplo n.º 20
0
        public static Numa numaaFlattenToNuma(this Numaa naa)
        {
            if (null == naa)
            {
                throw new ArgumentNullException("naa cannot be null.");
            }

            var pointer = Native.DllImports.numaaFlattenToNuma((HandleRef)naa);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Numa(pointer));
            }
        }
Ejemplo n.º 21
0
        public static Numa numaaGetNuma(this Numaa naa, int index, int accessflag)
        {
            if (null == naa)
            {
                throw new ArgumentNullException("naa cannot be null");
            }

            var pointer = Native.DllImports.numaaGetNuma((HandleRef)naa, index, accessflag);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Numa(pointer));
            }
        }
Ejemplo n.º 22
0
        public static Pixaa pixaSort2dByIndex(this Pixa pixas, Numaa naa, int copyflag)
        {
            if (null == pixas ||
                null == naa)
            {
                throw new ArgumentNullException("pixas, na cannot be null");
            }

            var pointer = Native.DllImports.pixaSort2dByIndex((HandleRef)pixas, (HandleRef)naa, copyflag);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Pixaa(pointer));
            }
        }
Ejemplo n.º 23
0
 public static Pixa showExtractNumbers(this Pix pixs, Sarray sa, Boxaa baa, Numaa naa, out Pix ppixdb)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 24
0
 // Postprocessing
 public static Sarray recogExtractNumbers(this L_Recog recog, HandleRef boxas, float scorethresh, int spacethresh, out Boxaa pbaa, out Numaa pnaa)
 {
     throw new NotImplementedException();
 }