How to configure EmguCV and Visual Studio Express 2010 in Win8.1x64

I am developing an application through EmguCV and Visual Studio Express 2010 in Win8.1x64. when I create a new project (Windows C # application), it automatically selects x86 as the target platform, and there is no other choice. When I try to read the image using the code below, I get an error. I know that he makes this error when the target platform is not selected or when it does not look like the operating system, but I do not know how to change the 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 programs with the wrong format. (Exception from HRESULT: 0x8007000B)"}

+6
source share
4 answers

first you need to make sure that you are using 64-bit emgucv with a 64-bit laptop.

To set the target platform, right-click the Current Project in the solution explorer and select Properties.

Then go to the Build Option and there you will see the PLATFORM TARGET option with the Dropdown option. Click on the 64-bit version (x64).

+2
source

A simple google search to install the target platform in visual studio 2010 How to set up projects on target platforms

Make sure that you are using the x64-bit version of EmguCV on a computer with x64-bit architecture.

+2
source

EmguCV has built-in binaries for x86 and x64, so it’s up to you to decide which architecture your application should target. You must add the binaries to the assembly directory, and EmguCV should find them. Otherwise, add the directory containing the binaries to your PATH.

+1
source

Try using EmguCV NuGet packages instead of installation materials - it looks like it automatically selects the right one that suits your build purpose. Using NuGet, you get all the necessary links that are automatically installed and files such as \Emgu.CV.UI.dll and \x64\opencv_ffmpeg310_64.dll to your output directory on the assembly.

0
source

Source: https://habr.com/ru/post/1014712/


All Articles