我遇到了与EmguCV有关的问题,无法捕捉摄像机视图。 我的代码如下:
Public _capture As Capture
Dim wr As Double
Public _capture As Capture
Dim wr As Double
Dim hr As Double
Dim rtg As Rectangle
Dim _IsOpen As Boolean
Public Sub OpenCamera(selcetCamNum As Integer)
Try
If _capture Is Nothing Then
selectNum = selcetCamNum
Me._capture = New Capture(selcetCamNum)
wr = 1
hr = 1
rtg = New Rectangle(CInt(105 * wr), CInt(155 * hr), CInt(110 * wr), CInt(50 * hr))
AddHandler Me._capture.ImageGrabbed, AddressOf ProcessFrame
Me._IsOpen = True
End If
Catch ex As Exception
MessageBox.Show("OpenCamera" & ex.Message)
End Try
End Sub
Public Sub CameraStart()
If Me._capture IsNot Nothing Then
If Me._IsStart = False Then
'start the capture
Me._capture.Start()
Me._IsStart = True
End If
End If
End Sub
我使用usb网络摄像头,它可以成功执行,但是当我使用视频采集卡(UPMOST-UPG301PB V)时,它无法成功执行,我在代码中插入了断点,那里&#39 ; s没有任何错误。 emgu的版本是2.4.10。谁能回答我如何解决这个问题?