An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
This is the error I got, on this line:
videoCapture = highgui.CvCreateCameraCapture(0);
The project shows no warnings or compilation errors so what can be the problem?
What this almost certainly means is that your application is being compiled as 64-bit, whereas the code in OpenCV is 32-bit, or vice-versa.
In Visual Sudio:
x86if it’s currently set tox64orAny CPUNow try re-running your application, the error should no longer occur.
Note: The download page for OpenCV states that “It does not contain 64-bit binaries“