Capture grabber = new Emgu.CV.Capture(0);
Image<Bgr, Byte> currentFrame=null;
while(currentFrame==null)
currentFrame = grabber.QueryFrame();
Byte[, ,] data;
data = currentFrame.Data;
imageBox1.Image = currentFrame;
public static BitmapSource ToBitmapSource(IImage image)
{
using (System.Drawing.Bitmap source = image.Bitmap)
{
IntPtr ptr = source.GetHbitmap(); //obtain the Hbitmap
BitmapSource bs = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(
ptr,
IntPtr.Zero,
Int32Rect.Empty,
System.Windows.Media.Imaging.BitmapSizeOptions.FromEmptyOptions());
DeleteObject(ptr); //release the HBitmap
return bs;
}
}
chipselect escreveu:André
Você está usando o OpenCV para reconhecimento de padrões/visão computacional?
Voltar para Visual C++/C/C++/C#
Usuários navegando neste fórum: Nenhum usuário registrado e 0 visitantes