Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Java OpenCV on Jetson Tk1 (http://www.chiefdelphi.com/forums/showthread.php?t=142658)

lethc 27-01-2016 17:16

Java OpenCV on Jetson Tk1
 
We recently started to use our Jetson that we got a while back to do vision tracking this season. We built a jar to start doing some vision tracking, we ran it on Windows first to see how it would run, and it ran great. We used an openCV library in our project. We then transferred the executable .jar over to our Jetson, and it wouldn't run, with the error:
Code:

java.lang.UnsatisfiedLinkError: no opencv_java310 in java.library.path
We tried running it as a relative path, using the java.library.path file, and putting the opencv jar inside the following folders: /usr/include/ /home/ubuntu/ and the project folder. We also tried to load the file as a static (explicitly stating the path), but with no luck either. We also tried reinstalling the libopencv from apt-get and getting the one from the JetPack installer.

What can we do to use an OpenCV library in our Java project and run it on our Jetson Tk1 (running ubuntu)? Do we need to build a library on the Jetson itself? How do we do that?

Turing'sEgo 27-01-2016 17:25

Re: Java OpenCV on Jetson Tk1
 
Did you add it into the external libraries in your project?

lethc 27-01-2016 17:31

Re: Java OpenCV on Jetson Tk1
 
Quote:

Originally Posted by Turing'sEgo (Post 1531105)
Did you add it into the external libraries in your project?

Yes, we added the openCV .jar library to our build path in our project

Jared 27-01-2016 17:45

Re: Java OpenCV on Jetson Tk1
 
The openCV library is loaded as a native library in java, so you need to have both the openCV jar and the openCV library in your java.library.path.

You could either build openCV on the Jetson, or possibly find a precompiled version for your device.

lobrien 20-02-2016 20:44

Re: Java OpenCV on Jetson Tk1
 
Has anyone gotten this to work? It's driving me crazy -- System.loadLibrary(Core.NATIVE_LIBRARY_NAME); executes successfully but when I attempt to access any OpenCV functions I get the linker error. I've even used nm to confirm that the .so is exporting the symbols.

I've been building OpenCV from scratch because I have not been able to get OpenCV4Tegra to install. Working with opencv-3.1.0. I know that at least the C/C++ aspect is working properly -- it's building those test applications and they run properly.

lobrien 21-02-2016 13:18

Re: Java OpenCV on Jetson Tk1
 
So, just for the record: finally got it to work by completely rebuilding from scratch and... *poof!* ... the seemingly-same library in the same location suddenly worked.


All times are GMT -5. The time now is 02:59.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi