如何解决此Message =" OpenCV:节点不代表用户对象(未知类型?)" [英] How do I fix this Message="OpenCV: The node does not represent a user object (unknown type?)"

查看:67
本文介绍了如何解决此Message =" OpenCV:节点不代表用户对象(未知类型?)"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我正在使用vb net 2005和emgu cv 2.9.0.1922做些什么。我想要一些帮助。

我有一个错误,我无法理解,因为天:( :( :( :( :(它在这条线上)



Dim haar As HaarCascade = New HaarCascade(。\ haarcascade_frontalface_alt_tree.xml)



____________________________



代码如下



Private Sub ProcessFame(ByVal sender As Object,ByVal arg As EventArgs)

'从相机中获取帧
Dim ImageFrame As Image(Of Emgu.CV.Structure.Bgr,Byte)= capturee.QueryFrame()



Dim haar As HaarCascade = New HaarCascade(。\ haarcascade_frontalface_alt_tree.xml)



If Not(ImageFrame)什么都没有)然后

'将图像转换为灰度

Dim grayFrame As Image(Of Emgu.CV.Structure.Gray,Byte)= ImageFrame.Convert(Of Emgu。 CV.Structure.Gray,Byte)()



'检测面部形成灰度图像并存储到数组

Dim faces = grayFrame.DetectHaarCascade(haar,1.4,4,CvEnum.HAAR_DETECTION_TYPE.DO_CANNY_PRUNING,New Size(20,20))



''在图像中每个检测到的脸上画一个绿色矩形

每张脸作为MCvAvgComp在脸上

ImageFrame.Draw(face.rect,New Bgr(Color.Green) ,3)

下一页



'检测到的面孔数量

Me.Label1.Text =总面孔检测到:& faces.Length



结束如果





'将图片显示到CamImageBox

CamImageBox.Image = ImageFrame



'将图片显示到pic_prise

pic_prise.Image = ImageFrame.ToBitmap( )



'结束子

________________________________________________



错误如下



L'exception Emgu.CV.Util.CvException n'apasétégérée

ErrorStr =未指定错误

Message =OpenCV:节点不代表用户对象(未知类型?)

Source =Emgu.CV

StackTrace:
$ b $bàEmgu.CV.CvInvoke.CvErrorHandler(Int32 status,String funcName,String errMsg,String fileName,Int32 line,IntPtr userData)
$ b $bàEmgu.CV.CvInvoke._cvLoad( String fileName,IntPtr memstorage,String name,IntPtr realName)
$ b $bàEmgu.CV.CvInvoke.cvLoad(String fileName,IntPtr memstorage,String name,In tPtr realName)
$ b $bàEmgu.CV.HaarCascade..ctor(String fileName)
$ b $bàWindowsApplication1.CameraCapture.ProcessFame(Object sender,EventArgs arg)
$ b $bàSystem.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
$ b $bàSystem.Windows.Forms.Application.ComponentManager.System。 Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID,Int32 reason,Int32 pvLoopData)
$ b $bàSystem.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason,ApplicationContext context)
$ b $bàSystem.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason,ApplicationContext context)
$ b $bàSystem.Windows.Forms.Application.Run(ApplicationContext context)
$ b $bàMicrosoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
$ b $bàMicrosoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoAppl icationModel()
$ b $bàMicrosoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String [] commandLine)
$ b $bàWindowsApplication1.My.MyApplication.Main(String [] Args)
$ b $bàSystem.AppDomain._nExecuteAssembly(Assembly assembly,String [] args)
$ b $bàSystem.AppDomain.ExecuteAssembly(String assemblyFile,Evidence assemblySecurity,String [] args)
$ b $bàMicrosoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
$ b $bàSystem.Threading.ThreadHelper.ThreadStart_Context(对象状态)
$ b $bàSystem.Threading .ExecutionContext.Run(ExecutionContext executionContext,ContextCallback回调,对象状态)
$ b $bàSystem.Threading.ThreadHelper.ThreadStart()





感谢您的帮助。

Hi,

I'm doing something with vb net 2005 and emgu cv 2.9.0.1922. I want some help.
I have an error i can't understand since days :( :( :( :( :( and it's on this line

Dim haar As HaarCascade = New HaarCascade(".\haarcascade_frontalface_alt_tree.xml")

____________________________

the code is the following

Private Sub ProcessFame(ByVal sender As Object, ByVal arg As EventArgs)
' Get frames from camera
Dim ImageFrame As Image(Of Emgu.CV.Structure.Bgr, Byte) = capturee.QueryFrame()

Dim haar As HaarCascade = New HaarCascade(".\haarcascade_frontalface_alt_tree.xml")

If Not (ImageFrame Is Nothing) Then
' Convert image to gray scale
Dim grayFrame As Image(Of Emgu.CV.Structure.Gray, Byte) = ImageFrame.Convert(Of Emgu.CV.Structure.Gray, Byte)()

' Detect faces form the gray-scale image and store into an array
Dim faces = grayFrame.DetectHaarCascade(haar, 1.4, 4, CvEnum.HAAR_DETECTION_TYPE.DO_CANNY_PRUNING, New Size(20, 20))

'' Draw a green rectangle on each detected face in image
For Each face As MCvAvgComp In faces
ImageFrame.Draw(face.rect, New Bgr(Color.Green), 3)
Next

' Number of faces detected
Me.Label1.Text = "Total faces detected : " & faces.Length

End If


'Show pictures into CamImageBox
CamImageBox.Image = ImageFrame

'Show pictures into pic_prise
pic_prise.Image = ImageFrame.ToBitmap()

'End Sub
________________________________________________

the error is the following

L'exception Emgu.CV.Util.CvException n'a pas été gérée
ErrorStr="Unspecified error"
Message="OpenCV: The node does not represent a user object (unknown type?)"
Source="Emgu.CV"
StackTrace:
à Emgu.CV.CvInvoke.CvErrorHandler(Int32 status, String funcName, String errMsg, String fileName, Int32 line, IntPtr userData)
à Emgu.CV.CvInvoke._cvLoad(String fileName, IntPtr memstorage, String name, IntPtr realName)
à Emgu.CV.CvInvoke.cvLoad(String fileName, IntPtr memstorage, String name, IntPtr realName)
à Emgu.CV.HaarCascade..ctor(String fileName)
à WindowsApplication1.CameraCapture.ProcessFame(Object sender, EventArgs arg)
à System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
à System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
à System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
à System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
à System.Windows.Forms.Application.Run(ApplicationContext context)
à Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
à Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
à Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
à WindowsApplication1.My.MyApplication.Main(String[] Args)
à System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
à System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
à Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
à System.Threading.ThreadHelper.ThreadStart_Context(Object state)
à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
à System.Threading.ThreadHelper.ThreadStart()


Thank you for your help.

推荐答案

这篇关于如何解决此Message =" OpenCV:节点不代表用户对象(未知类型?)"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆