Ask Your Question

Tom321992's profile - activity

2016-03-16 06:07:08 -0600 asked a question Value of type 'Emgu.CV.Mat' cannot be convertered to 'Emgu.CV.Image

Hello I have problem with this code. This is object recognition program and i have a problem with this source. On this line : imgSceneColor = capWebcam.QueryFrame() i have this error:Value of type 'Emgu.CV.Mat' cannot be convertered to 'Emgu.CV.Image. What I can change this ?

I use Visual Studio 2013 and EmguCv 3.0.

Sub PerformOBJECTDetectionAndUpdateGUI(sender As Object, arg As EventArgs)
        If (rdoImageFile.Checked = True) Then
            If (blnImageSceneLoaded = False Or blnImageToFindLoaded = False Or imgSceneColor Is Nothing Or imgToFindColor Is Nothing) Then
                Me.Text = "Nic nie zostało załadowane"
                Return
            End If
            Me.Text = "ładowanie"
            Application.DoEvents()
            stopwatch.Restart()
        ElseIf (rdoWebCam.Checked = True) Then
            Try
                imgSceneColor = capWebcam.QueryFrame()
            Catch ex As Exception
                Me.Text = ex.Message
                Return
            End Try
            If (imgSceneColor Is Nothing) Then
                Return
            End If
            If (imgToFindColor Is Nothing) Then
                lblResult.Image = imgSceneColor
                Return
            End If
        End If