当前位置: 首页>>代码示例>>Java>>正文


Java VuforiaLocalizer.CameraDirection方法代码示例

本文整理汇总了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);
    }
}
 
开发者ID:trc492,项目名称:Ftc2018RelicRecovery,代码行数:33,代码来源:FtcVuforia.java

示例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);
}
 
开发者ID:trc492,项目名称:Ftc2018RelicRecovery,代码行数:16,代码来源:VuforiaVision.java

示例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);
}
 
开发者ID:MHS-FIRSTrobotics,项目名称:RadicalRobotics2017,代码行数:9,代码来源:Vuforia.java

示例4: setCameraDirection

import org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer; //导入方法依赖的package包/类
public VuforiaLocalizerBuilder setCameraDirection(VuforiaLocalizer.CameraDirection cameraDirection) {
    parameters.cameraDirection = cameraDirection;
    return this;
}
 
开发者ID:MHS-FIRSTrobotics,项目名称:RadicalRobotics2017,代码行数:5,代码来源:Vuforia.java


注:本文中的org.firstinspires.ftc.robotcore.external.navigation.VuforiaLocalizer.CameraDirection方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。