2017-09-24 3 views
0

의 영상을 얻을 수 없다()나는 Emgu.CV.Capture 작동하지 않는 카메라 EmguCV

public Form1() { 
        InitializeComponent(); 
        grabber = new Emgu.CV.Capture();    
        grabber.QueryFrame(); 
        Application.Idle += new EventHandler(FrameGrabber);       
       } 

    void FrameGrabber(object sender, EventArgs e){ 
        currentFrame = grabber.QueryFrame(); 
        if (currentFrame != null){ 
         currentFrameCopy = currentFrame.Copy(); 
         imageBoxFrameGrabber.Image = currentFrame; 
        } 
       } 

사진을 얻을 수 없다 .. 내가 뭘하는지 말해 잘못

답변

0

을 카메라 캡쳐를 시작하면 실제로 어떤 카메라를 사용할 지 알려줄 필요가 있습니다.

이 줄 :

grabber = new Emgu.CV.Capture(); 

tell it which camera로 필요, 나는이로 변경 제안 : 이론적으로

grabber = new Emgu.CV.Capture(0); 

그것은 deafult 카메라를 열어야하지만 특정되는 가치가있다. 위에 그

+0

불행히도, 이것도 작동하지 않습니다. 그리고 그래버 = 새로운 Emgu.CV.Capture (@ "filename")은 작동합니다. –