Ejemplo n.º 1
0
        public static void ImageCopyMarshal1()
        {
            Mat matDst = new Mat(Glb.matSrc[0].Size(), Glb.matSrc[0].Type());
            int nbytes = (int)Glb.matSrc[0].Step() * Glb.matSrc[0].Height;

            IpUnsafe.MemcpyMarshal1(matDst.Data, Glb.matSrc[0].Data, nbytes);

            Glb.DrawMatAndHist(Glb.matSrc[0]);
            Glb.DrawMatAndHist(matDst);
        }
Ejemplo n.º 2
0
        public static void ImageCopyMarshal1()
        {
            Mat matDst = new Mat(Glb.matSrc.Size(), Glb.matSrc.Type());
            int nbytes = (int)Glb.matSrc.Step() * Glb.matSrc.Height;

            Glb.TimerStart();
            IpUnsafe.MemcpyMarshal1(matDst.Data, Glb.matSrc.Data, nbytes);
            Console.WriteLine("=> Method Time: {0}ms", Glb.TimerStop());

            Glb.DrawMatAndHist0(Glb.matSrc);
            Glb.DrawMatAndHist1(matDst);
            Glb.DrawMatAndHist2(null);
            matDst.Dispose();
        }