View Single Post
  #1   Spotlight this post!  
Unread 22-01-2017, 13:30
TBrient TBrient is offline
Registered User
FRC #5735
 
Join Date: Jan 2017
Location: Massachusetts
Posts: 1
TBrient is an unknown quantity at this point
Attempting to run a vision processing test results in library errors

I just created a GripPipeline file and put it into my eclipse project. When attempting to run a testing file (See below) I get the error "Exception in thread "main" java.lang.UsatisfiedLinkError: no cscore in java.library.path."

I have added all the WPILib libraries (including cscore) to my project's libraries list, and I have no clue what is wrong with the code.

Any suggestions?


My Test method:

public static void main(String args[]) {
UsbCamera camera = CameraServer.getInstance().startAutomaticCapture() ;
camera.setResolution(IMG_WIDTH, IMG_HEIGHT);

visionThread = new VisionThread(camera, new GripPipeline(), pipeline -> {
if (!pipeline.findContoursOutput().isEmpty()) {
Rect largestRectangle = Imgproc.boundingRect(pipeline.findContoursOutput() .get(0));
for (int i = 1; i < pipeline.findContoursOutput().size(); i++) {
Rect testRec = Imgproc.boundingRect(pipeline.findContoursOutput() .get(i));
if (largestRectangle.area() < testRec.area()) {
largestRectangle = testRec;
}
}
synchronized (imgLock) {
centerX = largestRectangle.x + (largestRectangle.width / 2);
System.out.println(centerX);
}
}
});
visionThread.start();
}
Reply With Quote