Go to Post Our team is using a video camera with frame-by-frame analysis to figure out all the characteristics of the foam ball. If the Boeing engineer says it's possible, I'm going to believe him. - sciencenerd [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
  #8   Spotlight this post!  
Unread 08-02-2017, 09:08
justaparent justaparent is offline
Registered User
no team
 
Join Date: Jan 2017
Location: Fairfield, CA
Posts: 3
justaparent is an unknown quantity at this point
Re: Using the Raspberry Pi for Vision Processing

Quote:
Originally Posted by thecoopster20 View Post
Thank you very much! I got the build to go through, now to just get it on the pi and then make the vision jar run on startup.
Make sure you write a little test program and verify that you can run it. There were runtime native lib. dependency issues i ran into, specifically I had to use this:

http://first.wpi.edu/FRC/roborio/mav...m-raspbian.jar

cscore.

This is my test program:

Code:
import org.opencv.core.Core;
import org.opencv.core.CvType;
import org.opencv.core.Mat;
import edu.wpi.first.wpilibj.CameraServer;
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.networktables.NetworkTable;
import org.opencv.core.Rect;
import org.opencv.imgproc.Imgproc;
//import com.ctre.CANTalon;
import edu.wpi.cscore.UsbCamera;
import edu.wpi.first.wpilibj.CameraServer;
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.vision.VisionRunner;
import edu.wpi.first.wpilibj.vision.VisionThread;
public class Test {
        public static void main(String[] args){


                VisionThread visionThread;
             
                Object imgLock = new Object();
                System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
                NetworkTable table = NetworkTable.getTable("foo");
                Mat mat = Mat.eye(3, 3, CvType.CV_8UC1);
                System.out.println("mat = " + mat.dump());
                UsbCamera camera = CameraServer.getInstance().startAutomaticCapture();
               camera.setResolution(640, 480);
    }
}
That's enough to verify that the needed native libraries can be loaded.
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 09:49.

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