I'm trying to install and configure JavaCV and OpenCV on ubuntu 14.04 .
Installed under the article and according to official instructions . I work in Eclipse .
In the properties of the project in the Run / Debug Settings item in the VM arguments field, added the line:
-Djava.library.path="/home/ant/opencv-3.0.0/lib Trying to run the code from the example from the official site:
import java.io.BufferedReader; import java.io.File; import java.io.IOException; import java.io.InputStreamReader; import static org.bytedeco.javacpp.opencv_core.*; import static org.bytedeco.javacpp.opencv_imgproc.*; import static org.bytedeco.javacpp.opencv_imgcodecs.*; public class Main { public static void main(String[] args) { BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); String filename = null; try { filename = bf.readLine(); } catch (IOException e) { System.out.println(e); } File file = new File(filename); System.out.println(file.exists()); IplImage image = cvLoadImage(filename); if (image != null) { cvSmooth(image, image); cvSaveImage(filename, image); cvReleaseImage(image); } } } The file itself is found, but the cvLoadImage() function does not execute, and the program crashes and displays to the console:
Java HotSpot (TM) 64-Bit Server VM warning: You have loaded the library /home/ant/opencv-3.0.0/lib/libopencv_core.so.3.0.0 which might have disabled stack guard. Try to fix the stack guard now. It is
execstack -c <libfile>or -z noexecstack.
How to fix it?