Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 671
mjyazdani Avatar asked Feb 05 '17 09:02

mjyazdani


3 Answers

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.

like image 75
Dharmil Asawla Avatar answered Nov 15 '22 16:11

Dharmil Asawla


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

like image 22
Raj Kumar Mishra Avatar answered Nov 15 '22 17:11

Raj Kumar Mishra


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.

like image 1
Ian Auty Avatar answered Nov 15 '22 16:11

Ian Auty