Menu

#4 Can't run samples

open
nobody
5
2014-08-28
2010-04-21
Jakob Gade
No

I installed the project and upgraded all the sample projects to .NET 4. All the samples throw an exeption when run.

From FaceDetectionVB:

System.TypeInitializationException was unhandled
Message=The type initializer for 'Emgu.CV.CvInvoke' threw an exception.
Source=Emgu.CV
TypeName=Emgu.CV.CvInvoke
StackTrace:
at Emgu.CV.CvInvoke.cvCreateImageHeader(Size size, IPL_DEPTH depth, Int32 channels)
at Emgu.CV.Image`2.AllocateData(Int32 rows, Int32 cols, Int32 numberOfChannels) in C:\Program Files (x86)\emgucv 2.1.0.793\Emgu.CV\Image.cs:line 234
at Emgu.CV.Image`2.set_Bitmap(Bitmap value) in C:\Program Files (x86)\emgucv 2.1.0.793\Emgu.CV\Image.cs:line 2708
at Emgu.CV.Image`2.LoadFileUsingBitmap(FileInfo file) in C:\Program Files (x86)\emgucv 2.1.0.793\Emgu.CV\Image.cs:line 93
at Emgu.CV.Image`2..ctor(String fileName) in C:\Program Files (x86)\emgucv 2.1.0.793\Emgu.CV\Image.cs:line 82
at FaceDetectionVB.Module1.Main() in C:\Program Files (x86)\emgucv 2.1.0.793\Emgu.CV.Example\FaceDetectionVB\Module1.vb:line 12
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.BadImageFormatException
Message=An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
Source=Emgu.CV
StackTrace:
at Emgu.CV.CvInvoke.cvRedirectError(CvErrorCallback errorHandler, IntPtr userdata, IntPtr prevUserdata)
at Emgu.CV.CvInvoke..cctor() in C:\Program Files (x86)\emgucv 2.1.0.793\Emgu.CV\PInvoke\CvInvoke.cs:line 40
InnerException:

Are there any prerequisites for installing and running this project? Like NHibernate or similar?

Discussion

  • Jakob Gade

    Jakob Gade - 2010-04-21

    I'm running Windows 7 64bit, that may have something to do with it as well...

     
  • Canming

    Canming - 2010-04-22

    You should download the 64-bit zip files instead of using the 32-bit installer.

     

Log in to post a comment.