Go to Post There can never be enough help, unless there's too much help. - Joshua May [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 19-02-2016, 19:25
thblackhelmetma's Avatar
thblackhelmetma thblackhelmetma is offline
Registered User
AKA: Aleksandar Antic
FRC #0670 (Homestead Robotics Team)
Team Role: CAD
 
Join Date: Feb 2016
Rookie Year: 2015
Location: Los Altos
Posts: 3
thblackhelmetma is an unknown quantity at this point
Question JavaCV Help

Hello fine members of Chief Delphi!

Team 670 is trying to use OpenCV for vision tracking of the goals, and for various reasons, we exclusively code in Java. Therefore, we are using JavaCV in order to do our tracking.

Our algorithm works fine when we use images and run it directly on our PC. However, when we upload the code to the roboRIO, we get an UnsatisfiedLinkError (Stack Trace Below). This error pops up whenever we call any method from any class in the OpenCV package.

Code:
ERROR Unhandled exception: java.lang.UnsatisfiedLinkError: no jniopencv_core in java.library.path at
[java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857),
java.lang.Runtime.loadLibrary0(Runtime.java:870),
java.lang.System.loadLibrary(System.java:1119),
org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:597),
org.bytedeco.javacpp.Loader.load(Loader.java:438),
org.bytedeco.javacpp.Loader.load(Loader.java:381),
org.bytedeco.javacpp.opencv_core.<clinit>(opencv_core.java:10),
java.lang.Class.forName0(Native Method),
java.lang.Class.forName(Class.java:340),
org.bytedeco.javacpp.Loader.load(Loader.java:413),
org.bytedeco.javacpp.Loader.load(Loader.java:381),
org.bytedeco.javacpp.opencv_imgcodecs.<clinit>(opencv_imgcodecs.java:13),
org.usfirst.frc.team670.robot.Robot.process(Robot.java:85),
org.usfirst.frc.team670.robot.Robot.operatorControl(Robot.java:68),
edu.wpi.first.wpilibj.SampleRobot.startCompetition(SampleRobot.java:159),
edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:242)]
WARNING: Robots don't quit!
I have verified our build.properties and build.xml files many times, and they appear to be correct, but I will include them here anyway.

build.properties
Code:
# Project specific information
package=org.usfirst.frc.team670.robot
robot.class=${package}.Robot
userLibs = ${user.home}/wpilib/user/lib/javacpp.jar:${user.home}/wpilib/user/lib/opencv.jar:${user.home}/wpilib/user/lib/javacv.jar
build.xml
Code:
<project name="FRC Deployment" default="deploy">
    <property file="${user.home}/wpilib/wpilib.properties"/>
    <property file="build.properties"/>
    <property file="${user.home}/wpilib/java/${version}/ant/build.properties"/>
    <property name="classpath" value="${opencv.jar}:${javacpp.jar}:${javacv.jar}" />
    <import file="${wpilib.ant.dir}/build.xml"/>
</project>
So far, I have tried adding various native libraries to all of the different jars, in order to try and appease the UnsatisfiedLinkError, adding various dll files, and many other solutions recommended by the Internet. Nothing has worked thus far.

Could anyone help with this problem?
Reply With Quote
 


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 08:54.

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