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

6

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)"}

c#
visual-studio-2010
emgucv
asked on Stack Overflow Feb 5, 2017 by mjyazdani • edited Feb 7, 2017 by mjyazdani

4 Answers

2

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).

answered on Stack Overflow Feb 7, 2017 by RAJ KUMAR MISHRA • edited Feb 13, 2017 by RAJ KUMAR MISHRA
2

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.

answered on Stack Overflow Feb 12, 2017 by Dharmil Asawla
1

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.

answered on Stack Overflow Feb 15, 2017 by Ian Auty
0

Try using the EmguCV NuGet packages instead of the installation stuff - looks like it automatically picks the right one corresponding to your build target. By using NuGet you get all necessary references automatically set and on build it copies stuff like \Emgu.CV.UI.dll and \x64\opencv_ffmpeg310_64.dll in your output directory.

answered on Stack Overflow Feb 21, 2017 by Ryugeist

User contributions licensed under CC BY-SA 3.0