I need to use OpenCV library in my Orbiter plugin.
OpenCV has two variants of API: C version and C++.
I've tried to add opencv in my orbiter plugin project in VS2010.
I've followed this tutorial:
http://opencv.willowgarage.com/wiki/VisualC++
Compilation and linking goes fine. VS2010 doesn't highlight any line with red - everything should be fine
But when I open Orbiter and start my plugin, Orbiter crashes ;(
For example this little piece of code:
It's C++ version of opencv.
But if I write the same thing in C version of opencv:
So, cv::imread() doesn't work but the save cvLoadImage() works.
Every cv::function won't work...
So, it's problem of connection opencv to project. But why does VS2010 doesn't show any errors?
Update:
I got this messages in output of VS2010:
Thanks in advance
OpenCV has two variants of API: C version and C++.
I've tried to add opencv in my orbiter plugin project in VS2010.
I've followed this tutorial:
http://opencv.willowgarage.com/wiki/VisualC++
Compilation and linking goes fine. VS2010 doesn't highlight any line with red - everything should be fine
But when I open Orbiter and start my plugin, Orbiter crashes ;(
For example this little piece of code:
Code:
ifstream ifile(tmplfilename);
if ( !FILE_LOADED && ifile ) {
// loading template file
Mat tmpl = cv::imread(tmplfilename, 1); // << here occurs error
FILE_LOADED = true;
}
It's C++ version of opencv.
But if I write the same thing in C version of opencv:
Code:
ifstream ifile(tmplfilename);
if ( !FILE_LOADED && ifile ) {
// loading template file
IplImage* tmpl = 0;
tmpl = cvLoadImage(tmplfilename, 1); // no error occurs
FILE_LOADED = true;
}
So, cv::imread() doesn't work but the save cvLoadImage() works.
Every cv::function won't work...
So, it's problem of connection opencv to project. But why does VS2010 doesn't show any errors?
Update:
I got this messages in output of VS2010:
First-chance exception at 0x5c4dd90c (msvcr100d.dll) in orbiter.exe: 0xC0000005: Access violation reading location 0x00706d62.
Unhandled exception at 0x5c4dd90c (msvcr100d.dll) in orbiter.exe: 0xC0000005: Access violation reading location 0x00706d62.
The program '[1744] orbiter.exe: Native' has exited with code -1073741819 (0xc0000005).
Thanks in advance
Last edited: