-
Notifications
You must be signed in to change notification settings - Fork 64
Detecting VuMarks
STATUS: COMPETITION READY LAST UPDATED: 02/12/2019 DogeCV 2019.1
This is a tutorial for how to detector VuMarks using DogeCV. You will need to feed DogeCV a Vuforia license key - if you do not already have one, this video explains how to get one. Now, before calling detector.init()
, you'll need to feed add the following line to your code:
detector.VUFORIA_KEY = "--YOUR KEY. THEY'RE FREE FOR FTC STUDENTS--";
Next, you'll likely want to change the camera's position. Use the following three lines of code to set the position of the phone's (or webcam's) lens relative to the robot center. If you need to move in the opposite direction (e.g. if the camera is on the left), just use a negative number.
detector.setCAMERA_FORWARD_DISPLACEMENT(x);
detector.setCAMERA_LEFT_DISPLACEMENT(y);
detector.setCAMERA_VERTICAL_DISPLACEMENT(z);
Finally, in the method parameters for detector.init()
, you'll need to tell DogeCV to look for VuMarks. If you're using the front or the back cameras, use the line below, setting the CameraMode
as appropriate:
detector.init(hardwareMap.appContext,CameraViewDisplay.getInstance(), DogeCV.CameraMode.FRONT, true);
Or, if you're using a webcam, see that tutorial, and simply replace the detector.init()
call given there with the one below:
detector.init(hardwareMap.appContext,CameraViewDisplay.getInstance(), DogeCV.CameraMode.WEBCAM, true, webcamName);
This will allow DogeCV to scan for VuMarks. Now, after you have run detector.enable()
- More stability testing
- Check position feedback with more real-world robots
- None yet. Please report them if you find any!
- Levi
detector.init(Context context, ViewDisplay viewDisplay, DogeCV.CameraMode cameraMode, boolean findVuMarks)
-
2019.1
- Major re-work. First time with full detector integration.
-
2018.2
- Initial implementation of Dogeforia