Skip to content
This repository has been archived by the owner on Dec 31, 2022. It is now read-only.

Detecting VuMarks

LegoF4 edited this page Feb 12, 2019 · 10 revisions

STATUS: COMPETITION READY LAST UPDATED: 02/12/2019 DogeCV 2019.1

How To

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()

Todo

  • More stability testing
  • Check position feedback with more real-world robots

Known Issues

  • None yet. Please report them if you find any!

Credits

  • Levi

Details

  • detector.init(Context context, ViewDisplay viewDisplay, DogeCV.CameraMode cameraMode, boolean findVuMarks)

Methods

Changelogs

  • 2019.1
    • Major re-work. First time with full detector integration.
  • 2018.2
    • Initial implementation of Dogeforia
Clone this wiki locally