I am developing an application via EmguCV and Visual Studio Express 2010 in Win8.1x64. when I create a new project (C# windows application), it automatically choose x86 as target platform and there is no other choice. When I try to read an image with below code I get the error. I know that it makes this error when target platform is not choosen or when it's not like the operation system, but I don't know how to change target platform to x64 in this case!
Image<Gray, byte> OrginalImage = new Image<Gray, byte>(Openfile.FileName);
[System.BadImageFormatException] = {"An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)"}
A simple google search to set target platform in visual studio 2010 How to: Configure Projects to Target Platforms
Make sure you are using the x64-bit version of EmguCV on a x64-bit CPU architecture computer.
first you need to make sure that you are using 64-bit emgucv with 64-bit laptop.
In order to set platform target, right click on Current project in Solution explorer and click on Properties Option.
Then navigate to Build Option and there you can see PLATFORM TARGET option with a Dropdown Option. Click on 64-bit Option(x64).
EmguCV has native binaries for both x86 and x64 so it's up to you to decide what architecture your application should target. You should be able to add the binaries to your build directory and EmguCV should be able to find them. Failing that, add the directory containing the binaries to your PATH.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With