I made the ~/.compile_opencv.sh as given https://help.ubuntu.com/community/OpenCV on this website and then I made this file opencvtest.cpp with the following contents . The image path is a valid path .
#include <opencv2/highgui/highgui.hpp>
using namespace cv;
int main() {
Mat img = imread("/home/AbKDs/Desktop/friends.jpg",CV_LOAD_IMAGE_COLOR);
imshow("opencvtest",img);
waitKey(0);
return 0;
}
I have created the alias opencv="~/.compile_opencv.sh". But when I run it shows the following error .
bash: /home/AbKDs/.compile_opencv.sh: Permission denied
Instead of this I tried the whole command but even then it shows fatal error .
opencvtest.cpp:1:39: fatal error: opencv2/highgui/highgui.hpp: No such file or directory
#include <opencv2/highgui/highgui.hpp>
^
compilation terminated.
Please help . Thanks in advance