Ask Your Question
-1

SOLVED How do I correctly install OpenCV 3.4.1?

asked 2018-05-17 12:28:31 -0600

Marko5280 gravatar image

updated 2018-05-19 18:16:49 -0600

I am trying to install OpenCV 3.4.1 using the instructions from 2.4!

https://docs.opencv.org/2.4/doc/tutorials/introduction/java_eclipse/java_eclipse.html

I have done it before and everything worked fine. However, after working with the Workspace command (and messing everything up), nothing works. So, I am starting from the beginning. I try to run the test program and get this error.

Exception in thread "main" java.lang.UnsatisfiedLinkError: org.opencv.core.Mat.n_eye(III)J at org.opencv.core.Mat.n_eye(Native Method) at org.opencv.core.Mat.eye(Mat.java:507) at First_test_Program.main(First_test_Program.java:11)

A search on the subject does not provide a solution. Which version of Java should I install? (7, 8, 9 or 10) The problem is in using old instructions to make a current installation.

Does anyone know how to make a current installation?

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
-1

answered 2018-05-19 18:15:59 -0600

Marko5280 gravatar image

updated 2018-05-19 19:15:32 -0600

SOLVED

FIRST, there is more recent documentation than 2.4! I am now using “OpenCV Java Tutorials

http://opencv-java-tutorials.readthed...

HEREhttp://opencv-java-tutorials.readthedocs.io/en/latest/02-first-java-application-with-opencv.html

SECOND, Eclipse is expecting Java jdk1.8.0_162! A different version of Java can be used if the Eclipse variable (-vm) is set properly.

THIRD, the OpenCV link does not work if the library is marked as a “System Library”.

DOES ANYONE KNOW THE FUNCTION OF A SYSTEM LIBRARY IN ECLIPSE?

edit flag offensive delete link more

Comments

I have tried to write a formatted, accurate and constructive question and answer. There is a downvote for both my question and my answer. My topic is not pure OpenCV, nor pure Java, nor pure Eclipse. Rather, it is about how to get into an OpenCV mode. Searching the internet (Google & OpenCV) did not produce any useful new information. This post could be in a Java forum, or an Eclipse forum, or this(OpenCV) forum. The anonymous downvotes without comment are not really constructive. It could lead to there not being a post at all. I personally, do not believe that would be the correct response. Are the administrators in agreement with this rating? No future positive votes will lead me to believe that my efforts are totally unappreciated. I eagerly await future comments and votes!

Marko5280 gravatar imageMarko5280 ( 2018-05-20 10:17:08 -0600 )edit
0

answered 2019-05-24 01:26:52 -0600

xyzzy gravatar image

I would like to vote this one up as I have (I belive) a related problem. Google searches do not help and Stackoverflow has produced no response. Following the directions here: https://docs.opencv.org/4.0.0/d7/d9f/... I get an output from cmake saying Link libraries: Dynamic load And after successfully compiling helloWold.java I can run it without getting "unsatisfied link error" but with an unadorned Segmentation Fault.

I am thinking cmake parameters as described are wrong for release 4.10 and 4.00?

Perhaps someone who has successfully got opencv and java working could share their cmake parameters? (I am using a raspberry pi 3)

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-05-17 12:28:31 -0600

Seen: 1,214 times

Last updated: May 19 '18