Hello!
I confused…
I installed and configured all for developing with Nsight Eclipse, by this tutorial:
http://www.hnwatcher.com/r/1110185/Setting-up-Jetson-TK1-for-OpenCV-Development
and try to build simple example:
#include "opencv2\highgui\highgui.hpp"
#include "opencv2\imgproc\imgproc.hpp"
int main() {
setenv("DISPLAY", ":0", 0);
cv::Mat image;
image = cv::imread("lenna.jpg");
cv::namedWindow("Original Image");
cv::imshow("Original Image", image);
}
and got error:
fatal error: opencv2\highgui\highgui.hpp: No such file or directory
Where I may find the opencv headers?
Thanks!
cj7
July 29, 2014, 2:26pm
#2
It depends, did you build cmake yourself? If you did, the headers are probably in /usr/local/include.
I installed it from pre-built libraries.
cj7
July 29, 2014, 5:14pm
#4
Have you looked at /usr/include?
So that’s where it!:) Ok, how I must add it to my project?
cj7
July 29, 2014, 6:23pm
#6
when compiling it would be -I/usr/include/. You may have errors if you use #include “opencv2\highgui\highgui.hpp” . Try #include <opencv2\highgui\highgui.hpp>
It doesn’t work. How I can include headers from Jetson? Because, I don’t have this headers on the host machine.
cj7
July 29, 2014, 6:52pm
#8
How are you compiling your code, are you using nsight to cross compile?
No. I use nsight to remote development.
cj7
July 29, 2014, 7:07pm
#10
Have you tried ssh to the board and using g++ -I/usr/include -L/usr/lib -lopencv_imgproc -lopencv_highgui -o (program) just to get it complied?
cj7
July 29, 2014, 7:13pm
#11
Maybe through Nsight you would have to go through settings, then nvcc compiler and in the include section you would add the directory where the opencv headers are placed.
I get the same error
I have already done this, but there’s no any effect
cj7
July 29, 2014, 8:19pm
#13
Looking at the code, I see that the includes have \ can you try changing them to /, Linux uses / and Windows uses .
It looks like a magic… I deleted my project from host machine, than made “git clone” again. Than I created new project with the same code, and everything works!
Thanks for your answers!