Go to Post No! I will not be an enabler for this madness. Go outside. See a movie. Read a book. LIVE!!!! - Herodotus [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 27-01-2016, 17:16
lethc's Avatar
lethc lethc is offline
#gkccurse
AKA: Becker Lethcoe
FRC #1806 (S.W.A.T.)
Team Role: Alumni
 
Join Date: Nov 2012
Rookie Year: 2013
Location: Smithville, MO
Posts: 119
lethc will become famous soon enough
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?
__________________
2016: Greater Kansas City Regional Finalists, Oklahoma Regional Winners, Tesla Semifinalists, IRI Quarterfinalists
2015: Greater Kansas City Regional Finalists, Oklahoma Regional Winners, Tesla Quarterfinalists, IRI Winners
2014: Central Illinois Regional Quarterfinalists, Greater Kansas City Regional Finalists, Newton Semifinalists
2013: Greater Kansas City Regional Winners, Oklahoma Regional Winners, Galileo Quarterfinalists
  #2   Spotlight this post!  
Unread 27-01-2016, 17:25
Turing'sEgo Turing'sEgo is offline
Registered User
no team
 
Join Date: Jan 2016
Rookie Year: 2010
Location: Boulder
Posts: 47
Turing'sEgo can only hope to improve
Re: Java OpenCV on Jetson Tk1

Did you add it into the external libraries in your project?
  #3   Spotlight this post!  
Unread 27-01-2016, 17:31
lethc's Avatar
lethc lethc is offline
#gkccurse
AKA: Becker Lethcoe
FRC #1806 (S.W.A.T.)
Team Role: Alumni
 
Join Date: Nov 2012
Rookie Year: 2013
Location: Smithville, MO
Posts: 119
lethc will become famous soon enough
Re: Java OpenCV on Jetson Tk1

Quote:
Originally Posted by Turing'sEgo View Post
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
__________________
2016: Greater Kansas City Regional Finalists, Oklahoma Regional Winners, Tesla Semifinalists, IRI Quarterfinalists
2015: Greater Kansas City Regional Finalists, Oklahoma Regional Winners, Tesla Quarterfinalists, IRI Winners
2014: Central Illinois Regional Quarterfinalists, Greater Kansas City Regional Finalists, Newton Semifinalists
2013: Greater Kansas City Regional Winners, Oklahoma Regional Winners, Galileo Quarterfinalists
  #4   Spotlight this post!  
Unread 27-01-2016, 17:45
Jared's Avatar
Jared Jared is offline
Registered User
no team
Team Role: Programmer
 
Join Date: Aug 2013
Rookie Year: 2012
Location: Connecticut
Posts: 602
Jared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond reputeJared has a reputation beyond repute
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.
  #5   Spotlight this post!  
Unread 20-02-2016, 20:44
lobrien lobrien is offline
Registered User
FRC #3880
Team Role: Mentor
 
Join Date: Jan 2016
Rookie Year: 2016
Location: Kailua Kona, Hawaii
Posts: 6
lobrien is an unknown quantity at this point
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.
  #6   Spotlight this post!  
Unread 21-02-2016, 13:18
lobrien lobrien is offline
Registered User
FRC #3880
Team Role: Mentor
 
Join Date: Jan 2016
Rookie Year: 2016
Location: Kailua Kona, Hawaii
Posts: 6
lobrien is an unknown quantity at this point
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.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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