通过opencv打开本地摄像头, 如果想拿到YUY2的camera的原始数据,并把这帧存为本地图.
代码不知道怎么写.这是现在的代码,但应该拿到的是mpeg,不是YUY2.
mat = new Mat();
result = true;
capture = new VideoCapture();
capture.Open(0);
Task.Run(() =>
{
while (result)
{
capture.Read(mat);
var bitmap = BitmapConverter.ToBitmap(mat);
pictureBox.Image = bitmap;
imgshow = bitmap;
}
});
--
FROM 123.113.104.*