Hi all,
Does any body know if the supplied openCV libs have any limitation? I’m getting errors loading images through opencv.
Currently testing the cv libs like this:
Inside addons/ofxOpenCv/libs/opencv I create a test.c file:
#include "include/opencv2/opencv.hpp"
#include "include/opencv/cv.h"
#include <stdio.h>
int main() {
cv::Mat loader = cvLoadImageM("/home/arnaud/Desktop/robot.png");
std::cout << loader.rows;
}
I then compile it like this:
$ gcc -c test.c -I include/
$ g++ -o test test.o lib/linux64/libopencv_legacy.a lib/linux64/libopencv_objdetect.a lib/linux64/libopencv_features2d.a lib/linux64/libopencv_imgproc.a lib/linux64/libopencv_video.a lib/linux64/libopencv_highgui.a lib/linux64/libopencv_ml.a lib/linux64/libopencv_core.a -lz -lrt
Executing it:
$ ./test
0
So it doesn’t load the image
Changing the imread line to the C api:
cv::Mat loader = cvLoadImageM("/home/arnaud/Desktop/robot.png");
and executing it:
$ ./test
Segmentation fault (core dumped)
The reason I use opencv to load images is that ofImage is limited to the GPU. At least loading huge images results in a white image… I read on the forum it’s because of GPU limitiations…
Testing with develop branch on linux64…
Now compiling openCV 2.4 in the background…
Rg,
Arnaud