Emgu Ip Cam查询框架

时间:2019-02-25 05:58:55

标签: vb.net emgucv ip-camera alpr

我使用Emgu v3.4.3.3016连接到Camera for ALPR解决方案,当我连接到Webcam时一切正常,当我尝试连接到IP cam RTSP流queryframe时,始终不返回任何内容,我可以通过以下方式连接到RTSP: iSpy&Vlc没有任何麻烦,请告知我哪里出了错:

开始捕获的代码:

Try
                disposeCamera()
                capWebcam = New VideoCapture(ComboBoxCameraList.SelectedIndex)
                'capWebcam = New VideoCapture("rtsp://admin:admin@192.168.226.201:554/profile3")
                capWebcam.QueryFrame()
                capWebcam.SetCaptureProperty(Emgu.CV.CvEnum.CapProp.FrameWidth, 704)
                capWebcam.SetCaptureProperty(Emgu.CV.CvEnum.CapProp.FrameHeight, 576)
                capturePaused = False
                AddHandler Application.Idle, New EventHandler(AddressOf Me.ProcessFrameAndUpdateGUI)
            Catch ex As Exception
                MessageBox.Show("unable to read from webcam, error: " + Environment.NewLine + Environment.NewLine +
                                ex.Message + Environment.NewLine + Environment.NewLine +
                                "exiting program")
                Return
            End Try

'到处理框的代码:

Try
            If Not capturePaused Then
                Dim imgOriginal As Mat = capWebcam.QueryFrame()
                If (imgOriginal Is Nothing) Then
                    MessageBox.Show("unable to read frame from webcam" + Environment.NewLine + Environment.NewLine +
                                    "exiting program")
                    Application.Exit()
                    Return
                End If
                If Not IsNothing(ibOriginal.Image) Then
                    ibOriginal.Image.Dispose()
                End If
                ibOriginal.Image = imgOriginal
            End If
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try

0 个答案:

没有答案