Данные класса дополненного изображения нулевые - PullRequest
0 голосов
/ 24 апреля 2019

Я пытаюсь отсканировать изображение и показать 3D-изображение с помощью AR-Core android. Когда я пытаюсь получить Augmented-Images из класса, он дает нулевые данные.

@RequiresApi(api = Build.VERSION_CODES.N)
    private void onUpdateFrame(FrameTime frameTime) {
        Frame frame = arFragment.getArSceneView().getArFrame();
        System.out.println("frame"+frame.getUpdatedTrackables(AugmentedImage.class));
        Collection<AugmentedImage> augmentedImages = frame.getUpdatedTrackables(AugmentedImage.class);
        System.out.println("update"+augmentedImages);
        for (AugmentedImage augmentedImage : augmentedImages) {
            System.out.println("augmentedimage");
            if (augmentedImage.getTrackingState() == TrackingState.TRACKING) {
                System.out.println("tracked");
                if (augmentedImage.getName().equals("bijoy_keyboard_image") && shouldAddModel) {
                    System.out.println("loading");
                    placeObject(arFragment, augmentedImage.createAnchor(augmentedImage.getCenterPose()), Uri.parse("model.sfb"));
                    shouldAddModel = false;
                }
            }
        }
    }
...