![]() |
Target Tracking
I am new to FRC Java and see that you must put in code to use a USB webcam. When I looked through all of the Java and Camera FRC tutorials and could not find any mention of what the actual coding is. When I tried to look on here I found some help but not much in the matter of basic camera use. Thanks if you are able to help me.
|
Re: Target Tracking
I have a couple of questions?
1. Where do you plan to run the code? On the roborio, on the driverstation (I would advise against this), on a co-processor? If on the roborio just use TowerTracker and make it run as a seperate task on the rio. If on a co-processor, we have some code that runs on a raspberry pi that transfers necessary data through the network tables. On the driverstation, use Towertracker and run it with network tables. 2. Also, are you talking about tracking targets or just getting a feed to the driverstation. |
Re: Target Tracking
I plan on running this code on the roborio, and I would like to use this to be able to line up our shooter with the upper tower goal in this year's game.
|
Re: Target Tracking
Alright, so my recommendation would be TowerTracker.
CD Link: http://www.chiefdelphi.com/forums/sh....php?p=1527019 Github Link: https://github.com/fauge7/TowerTrack...erTracker.java This code is meant to be run on the driverstation, but can easily be ported to run on the roborio. To do this, you need to set up opencv on the roborio. Instructions can be found here. The instructions to set up eclipse to compile opencv code is written for c++ (by me). But I'm not sure how you would do it for java. |
Re: Target Tracking
Quote:
Thanks for recommending my program :) my advice is to see if you have an axis camera. If not with the usb camera you will have to run mjpeg-streamer on the rio to stream the usb camera to a web interface where Tower tracker can take the video stream and process it. |
Re: Target Tracking
Quote:
videoCapture = new VideoCapture(); to videoCapture = new VideoCapture(); videoCapture.open(0). This opens up the usb camera plugged into the roborio. This works with virtuald's version on opencv on the roborio. However, the version he build doesn't work with mjpg streams. If you really want to use that, I would use opencv2 that another team compiled. |
Re: Target Tracking
Quote:
|
| All times are GMT -5. The time now is 07:23 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi