3
에 카메라 이미지를 렌더링 내가 uEye 카메라를 가지고와 나는 1000MS 간격으로 이미지의 스냅 샷을하고 난 노력하고 있어요 그래서WPF의 Image 컨트롤
Bitmap MyBitmap;
// get geometry of uEye image buffer
int width = 0, height = 0, bitspp = 0, pitch = 0, bytespp = 0;
long imagesize = 0;
m_uEye.InquireImageMem(m_pCurMem, GetImageID(m_pCurMem), ref width, ref height, ref bitspp, ref pitch);
bytespp = (bitspp + 1)/8;
imagesize = width * height * bytespp; // image size in bytes
// bulit a system bitmap
MyBitmap = new Bitmap(width, height, PixelFormat.Format24bppRgb);
// fill the system bitmap with the image data from the uEye SDK buffer
BitmapData bd = MyBitmap.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb);
m_uEye.CopyImageMem(m_pCurMem, GetImageID(m_pCurMem), bd.Scan0);
MyBitmap.UnlockBits(bd);
같은 WPF Image
제어에서 그들을 렌더링 할 이 비트 맵을 Image
컨트롤에 1 초의 속도로 넣습니다. Bitmap
을 Image
컨트롤에 나타나게하고 가능한 한 최소한의 메모리 사용량을 남겨두면 좋은 프로그래머가 될 것입니다. :) 여기