Vb.net 埃姆古没有';不适用于我-无法打开本地映像

Vb.net 埃姆古没有';不适用于我-无法打开本地映像,vb.net,emgucv,Vb.net,Emgucv,我目前正在VB.NET中使用EmguCV。 我的程序无法打开图像,我不明白为什么 注意:打开文件的行由软件从C#转换为VB.NET 代码中可能有什么问题 Imports Emgu.CV Imports Emgu.CV.Util Imports Emgu.CV.Structure Module analyse ' module général d'analyse ' on assume que les images soient dans le dossier /images/... ' le

我目前正在VB.NET中使用EmguCV。 我的程序无法打开图像,我不明白为什么

注意:打开文件的行由软件从C#转换为VB.NET

代码中可能有什么问题

Imports Emgu.CV
Imports Emgu.CV.Util
Imports Emgu.CV.Structure

Module analyse

' module général d'analyse
' on assume que les images soient dans le dossier /images/...
' les images ont déjà été tresholdé par le backend

Sub detect_lines()

    Dim RhoRes As Double = 2
    Dim Threshold As Double = 100
    Dim MinLineWidth As Double = 1
    Dim linegap As Integer = 3
    Dim ThetaRes As Double = Math.PI / 180

    Dim image = CvInvoke.cvLoadImage("frame3.jpg", 1)
    Dim img As New Image(Of Bgr, Byte)("frame3.jpg")

    Dim Linez()() As LineSegment2D = img.HoughLinesBinary(RhoRes, ThetaRes, Threshold, 0, 0)

    If Linez(0).Length = 0 Then 'Greater than or equal to
        For i = 0 To Linez(0).Length - 1

            If Linez(0)(i).Length = 10 And Linez(0)(i).Length = 30 Then 'Greater than and less than or equal to
                img.Draw(Linez(0)(i), New Bgr(0, 255, 0), 3)
            End If

            If Linez(0)(i).Length = 30 And Linez(0)(i).Length = 60 Then 'Greater than and less than or equal to
                img.Draw(Linez(0)(i), New Bgr(255, 0, 0), 3)
            End If

            If Linez(0)(i).Length = 60 Then
                img.Draw(Linez(0)(i), New Bgr(0, 0, 255), 3)
            End If

        Next
    End If

    MsgBox(Linez.ToString)

End Sub
End Module

程序是否引发异常?如果是,在哪一行以及异常类型和错误消息是什么?请检查图像是否已复制到/bin目录中?谢谢您的帮助,但我不会继续这样做。。。