本文整理汇总了Java中org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.CameraDirection方法的典型用法代码示例。如果您正苦于以下问题:Java VuforiaLocalizer.CameraDirection方法的具体用法?Java VuforiaLocalizer.CameraDirection怎么用?Java VuforiaLocalizer.CameraDirection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer
的用法示例。
在下文中一共展示了VuforiaLocalizer.CameraDirection方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: FtcVuforia
import org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer; //导入方法依赖的package包/类
/**
* Constructor: Create an instance of this object. It initializes Vuforia with the specified target images and
* other parameters.
*
* @param licenseKey specifies the Vuforia license key.
* @param cameraViewId specifies the camera view ID on the activity, -1 if none given.
* @param cameraDir specifies which camera to use (front or back).
* @param trackablesFile specifies the XML file that contains the target info, can be null.
* @param numTargets specifies the number of simultaneous trackable targets.
* @param cameraMonitorFeedback specifies the feedback image showing the orientation of the target.
*/
public FtcVuforia(
String licenseKey, int cameraViewId, VuforiaLocalizer.CameraDirection cameraDir,
String trackablesFile, int numTargets,
VuforiaLocalizer.Parameters.CameraMonitorFeedback cameraMonitorFeedback)
{
this.cameraDir = cameraDir;
//
// If no camera view ID, do not activate camera monitor view to save power.
//
VuforiaLocalizer.Parameters params =
cameraViewId == -1? new VuforiaLocalizer.Parameters(): new VuforiaLocalizer.Parameters(cameraViewId);
params.vuforiaLicenseKey = licenseKey;
params.cameraDirection = cameraDir;
params.cameraMonitorFeedback = cameraMonitorFeedback;
localizer = ClassFactory.createVuforiaLocalizer(params);
Vuforia.setHint(HINT.HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS, numTargets);
if (trackablesFile != null)
{
targetList = localizer.loadTrackablesFromAsset(trackablesFile);
}
}
示例2: VuforiaVision
import org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer; //导入方法依赖的package包/类
public VuforiaVision(Robot robot, int cameraViewId)
{
final String VUFORIA_LICENSE_KEY =
"AdCwzDH/////AAAAGeDkDS3ukU9+lIXc19LMh+cKk29caNhOl8UqmZOymRGwVwT1ZN8uaPdE3Q+zceDu9AKNsqL9qLblSFV" +
"/x8Y3jfOZdjMFs0CQSQOEyWv3xfJsdSmevXDQDQr+4KI31HY2YSf/KB/kyxfuRMk4Pi+vWS+oLl65o7sWPiyFgzoM74ENyb" +
"j4FgteD/2b6B+UFuwkHWKBNpp18wrpkaiFfr/FCbRFcdWP5mrjlEZM6eOj171dybw97HPeZbGihnnxOeeUv075O7P167AVq" +
"aiPy2eRK7OCubR32KXOqQKoyF6AXp+qu2cOTApXS5dqOOseEm+HE4eMF0S2Pld3i5AWBIR+JlPXDuc9LwoH2Q8iDwUK1+4g";
final VuforiaLocalizer.CameraDirection CAMERA_DIR = VuforiaLocalizer.CameraDirection.BACK;
final String TRACKABLES_FILE = "RelicVuMark";
this.robot = robot;
vuforia = new FtcVuforia(VUFORIA_LICENSE_KEY, cameraViewId, CAMERA_DIR, TRACKABLES_FILE, 1);
vuforia.setTargetInfo(0, "relicVuMarkTemplate");
vuforia.configVideoSource(IMAGE_WIDTH, IMAGE_HEIGHT, FRAME_QUEUE_CAPACITY);
}
示例3: build
import org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer; //导入方法依赖的package包/类
@NonNull
public static VuforiaLocalizer build(@NotNull String apiKey, @NotNull VuforiaLocalizer.CameraDirection direction, @IdRes int viewId, boolean extendingTracking) {
final VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters(viewId);
parameters.cameraDirection = direction;
parameters.vuforiaLicenseKey = apiKey;
parameters.useExtendedTracking = extendingTracking;
return ClassFactory.createVuforiaLocalizer(parameters);
}
示例4: setCameraDirection
import org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer; //导入方法依赖的package包/类
public VuforiaLocalizerBuilder setCameraDirection(VuforiaLocalizer.CameraDirection cameraDirection) {
parameters.cameraDirection = cameraDirection;
return this;
}