Пример #1
0
        public static void ImageCopyBufferClass()
        {
            Mat matDst = new Mat(Glb.matSrc[0].Size(), Glb.matSrc[0].Type());
            int nbytes = (int)Glb.matSrc[0].Step() * Glb.matSrc[0].Height;

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

            Glb.DrawMatAndHist(Glb.matSrc[0]);
            Glb.DrawMatAndHist(matDst);
        }
Пример #2
0
        public static void ImageCopyBufferClass()
        {
            Mat matDst = new Mat(Glb.matSrc.Size(), Glb.matSrc.Type());
            int nbytes = (int)Glb.matSrc.Step() * Glb.matSrc.Height;

            Glb.TimerStart();
            IpUnsafe.MemcpyBufferClass(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();
        }