非静态字段VideoCapture.QueryFrame()需要Object引用

问题描述 投票:0回答:1

所以我用“emgu.cv”来捕捉图像。我是c#的新手并且一开始就坚持了下来。无法弄清楚如何使其成为非静态的。尝试了很多在线解决方案

namespace WindowsFormsApplication1
{

    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            VideoCapture capture = new VideoCapture(); 
            Bitmap image = VideoCapture.QueryFrame().Bitmap; 
        }
    }
}
c# asp.net winforms emgucv
1个回答
1
投票

您需要引用类的实例而不是类:

Bitmap image = capture.QueryFrame().Bitmap; 
© www.soinside.com 2019 - 2024. All rights reserved.