开发者

Is there any function in OpenCV or Emgu CV desktop capture options? (addons, libs, classes)

Is there any function in OpenCV or Emgu CV desktop capture options? (addons, libs, classes) So I kn开发者_运维百科ow we can capture camera in a very easy way, is there any option for desktop capturing that way?


I would recommend doing a screen capture outside of Emgu (ie, in non-Emgu C++/C#).

The first step is to create a bitmap from the screen image. There are plenty of websites detailing methods of how to do this. I found this one helpful.

Once you have a bitmap, it's easy to create new Emgu Image<,> from it. Here's the documentation for that.

Good luck, and have fun!


This solution is also one outside of emgucv: you can also use the c sharp System.Drawing.Graphics.CopyFromScreen

Bitmap bitmap = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
Graphics graphics = Graphics.FromImage(bitmap as Image);
graphics.CopyFromScreen(0, 0, 0, 0, bitmap.Size);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜