I am perplexing to use EMGUCV for C#. Currently i have hallowed Visual
Studio 2010 demonstrate Edition. When perplexing to govern some
rudimentary commands a Emgu.CV.CvInvoke threw an difference came out so i
put a unmanaged formula in a exe folder. But still it continued to give me
a error. So i attempted adding a unmanaged formula to fortitude
path-finder and still it is giving me this error. Is there anything else
that i can do so i can finally use emguCV?The difference is
System.TypeInitializationException was unhandled Message=The form
initializer for 'Emgu.CV.CvInvoke' threw an exception.having smoke-stack
trace: during Emgu.CV.CvInvoke.cvCreateCameraCapture(Int32 index)
during Emgu.CV.Capture..ctor(Int32 camIndex) in C:\Program Files
(x86)\Emgu\libemgucv-windows-x64-2.2.1.1150\Emgu.CV\Capture\Capture.cs:line
105 during Emgu.CV.Capture..ctor() in C:\Program Files
(x86)\Emgu\libemgucv-windows-x64-2.2.1.1150\Emgu.CV\Capture\Capture.cs:line
93 during cameraWorks.Form1.camButton_Click(Object sender, EventArgs e)
in C:\Users\Adrian\documents\visual studio
2010\Projects\cameraWorks\cameraWorks\Form1.cs:line 38 during
System.Windows.Forms.Control.OnClick(EventArgs e) during
System.Windows.Forms.Button.OnClick(EventArgs e) during
System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) during
System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button,
Int32 clicks) during System.Windows.Forms.Control.WndProc(Message& m)
during System.Windows.Forms.ButtonBase.WndProc(Message& m) during
System.Windows.Forms.Button.WndProc(Message& m) during
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
during System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&
m) during System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr
hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) during
System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
during
System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr
dwComponentID, Int32 reason, Int32 pvLoopData) during
System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32
reason, ApplicationContext context) during
System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32
reason, ApplicationContext context) during
System.Windows.Forms.Application.Run(Form mainForm) during
cameraWorks.Program.Main() in C:\Users\Adrian\documents\visual studio
2010\Projects\cameraWorks\cameraWorks\Program.cs:line 18 during
System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[]
args) during System.AppDomain.ExecuteAssembly(String assemblyFile,
Evidence assemblySecurity, String[] args) during
Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() during
System.Threading.ThreadHelper.ThreadStart_Context(Object state) during
System.Threading.ExecutionContext.Run(ExecutionContext executionContext,
ContextCallback callback, Object state, Boolean ignoreSyncCtx) during
System.Threading.ExecutionContext.Run(ExecutionContext executionContext,
ContextCallback callback, Object state) during
System.Threading.ThreadHelper.ThreadStart()InnerException:
InnerException: System.BadImageFormatException Message=An try was
finished to bucket a way with an crude format. (Exception from HRESULT:
0x8007000B) Source=Emgu.CV StackTrace: during
Emgu.CV.CvInvoke.cvRedirectError(CvErrorCallback errorHandler, IntPtr
userdata, IntPtr prevUserdata) during
Emgu.CV.CvInvoke..cctor() in C:\Program Files
(x86)\Emgu\libemgucv-windows-x64-2.2.1.1150\Emgu.CV\PInvoke\CvInvoke.cs:line
50I am wholly executing some rudimentary formula being:public biased
category Form1 : Form{ private Capture capture; private bool
captureInProgress; open Form1() { InitializeComponent(); }
private vacant ProcessFrame(Object sender, EventArgs args ) {
Image ImageFrame = capture.QueryFrame(); CamImageBox1.Image =
ImageFrame; } private vacant camButton_Click(object sender,
EventArgs e) { if (capture == null) { try
{ constraint = new Capture(); }
locate (NullReferenceException excpt) {
MessageBox.Show(excpt.Message); } } if (capture
!= null) { if (captureInProgress) {
camButton.Text = "start"; } else {
camButton.Text = "stop"; Application.Idle +=
ProcessFrame; } captureInProgress =
!captureInProgress; } } private vacant ReleaseData() {
if (capture != null) { capture.Dispose(); }
}The examples of emguCV work on my computer.Thanks Alot Adrian
No comments:
Post a Comment