标签: arcore

访问ARCore中的图像数据字节

我创建了一个ARCore Session并通过Session #setCameraTextureName方法附加了一个OpenGL纹理id 来显示我的相机数据.我想访问纹理上显示的摄像机图像数据字节.

ARKitTango提供对每个帧的图像字节的访问,但似乎在ARCore API中没有任何容易提供的东西.

在使用ARCore时,还有其他方法可以访问图像字节吗?

java android arcore

8
推荐指数
2
解决办法
2986
查看次数

使用Sceneform生态系统有问题地旋转3D模型

我正在Android Project中使用Sceneform SDK

我的项目中有sfbsfa对象,并且我希望对象的初始旋转被旋转90度。我该如何实现?

我在这些文件中找到了下一个代码,并更改了比例。

但是我没有找到轮换的方法。

model: {
  attributes: [
     "Position",
     "TexCoord",
     "Orientation",
  ],
  collision: {},
  file: "sampledata/models/redmixer.obj",
  name: "redmixer",
  scale: 0.010015,
},
Run Code Online (Sandbox Code Playgroud)

android model augmented-reality arcore sceneform

8
推荐指数
1
解决办法
2238
查看次数

Android 的 SceneKit 等价物是什么?

我使用SceneKit Framework创建了一个ARKit应用程序。我想把它带到ARCore,但直接使用 OpenGL 似乎令人生畏。

是否有适用于 Android 开发人员的 SceneKit 等高级场景图框架可以帮助导入和渲染 3D 模型?

android ios scenekit arcore

7
推荐指数
1
解决办法
5319
查看次数

无法在Android Studio的模拟器上安装ARCore

我不知道是否可以问这个问题,但是我真的不知道如何在Android仿真设备上使用ARCore。根据官方指南,我应该在像素/像素2设备上使用API​​ 8.1,以便运行任何使用ARCore的应用。遗憾的是,这些模拟器没有对Play商店的支持,没有Play商店,我将无法在设备上安装ARCore。Play商店内置的设备映像不能运行ARCore。我真的对如何以这种方式测试ARCore感到困惑。我需要它来开发用于大学课程的应用程序,并且需要熟悉增强现实开发,但是由于这个问题,我什至无法入门。

android augmented-reality android-emulator arcore

7
推荐指数
1
解决办法
2777
查看次数

如何使用Unity使用ARCore录制视频?

我一直坚持这个问题一个多月了.我只需要在人们使用AR应用程序时录制视频.

有几种选择:

1.在Unity中为每一帧拍摄屏幕截图.
我尝试每帧截图.这太慢了.fps只有5.
然后我尝试将纹理保存到数组中,然后将它们编码为图像.
这会占用大量内存,并会导致移动电话显着丢帧.fps是10左右.
如果有人对这种方法有好主意,请告诉我.

2.使用本机插件录制视频.
我还没有找到任何解决方案.我担心这可能与ARCore发生冲突.

我知道有一个Android解决方案,但理想情况下我想使用Unity.任何帮助表示赞赏,谢谢!

3.从ARCore计算机视觉示例提供的纹理读取器api中保存纹理.
目录中有一个Computer Vision示例.我可以通过它的api直接从GPU获得纹理.

但是,fps仍然很低.使用其边缘检测器示例,fps大约为15.我成功地将这些帧保存到另一个线程中的本地目录.但是fps仍然是不可接受的.底线是720p,30fps.

PS:我只需要保存帧.我可以将它们编码为视频.

PPS:只需记录相机进纸并将相机进纸和增强对象记录在一起都可以.任何一个成就都很棒.

unity-game-engine arcore

7
推荐指数
1
解决办法
1895
查看次数

在垂直平面上添加对象始终在AR核心中旋转

在此输入图像描述我在sceneform AR Fragment中的垂直平面上添加了一个图像.但它总是被轮换.代码在水平面上工作正常.我在垂直平面上放置图像的代码如下.

arFragment.setOnTapArPlaneListener { hitResult: HitResult, 
                                         plane: Plane, 
                                   motionEvent: MotionEvent ->

    if(!isOnceTapedOnSurface) {
        val anchor = hitResult.createAnchor()
        val anchorNode = AnchorNode(anchor)
        anchorNode.setParent(arFragment.arSceneView.scene)

        andy = TransformableNode(arFragment.transformationSystem)

        if(plane.type == Plane.Type.VERTICAL) {
            val anchorUp = anchorNode.up
            andy.setLookDirection(Vector3.up(), anchorUp)
        }

        andy.setParent(anchorNode)
        andy.renderable = andyRenderable
        andy.select()

        // arFragment.arSceneView.planeRenderer.isVisible = false
        isOnceTapedOnSurface = true
    }
}
Run Code Online (Sandbox Code Playgroud)

android kotlin arcore sceneform

7
推荐指数
1
解决办法
391
查看次数

使用 ARCORE 在墙上放置图像

我想用 ARCore 在墙上放置一个图像。该图像是从常规图像视图转换而来的。我只检测垂直表面,但是当我放置图像时,它是这样放置的:我无法弄清楚如何变换以将图像挂在墙上,就像在现实生活中一样。 在此处输入图片说明

    AR fragment
    fragment = (ArFragment) 
    getSupportFragmentManager().findFragmentById(R.id.sceneform_fragment);

    CompletableFuture<ViewRenderable> imgView = ViewRenderable.builder()
            .setView(this, R.layout.textview)
            .build();

    CompletableFuture.allOf(imgView).handle((notUsed, throwable) -> {
        // When you build a Renderable, Sceneform loads its resources in the background while
        // returning a CompletableFuture. Call handle(), thenAccept(), or check isDone()
        // before calling get().

        if (throwable != null) {

            Log.d("MainActivity", "onCreate: " + "Unable to load renderable");
            return null;
        }

        try {

            imageViewRenderable = imgView.get();

        } catch (InterruptedException | ExecutionException ex) {
            Log.d("MainActivity", "onCreate: Unable to …
Run Code Online (Sandbox Code Playgroud)

java android augmented-reality arcore

7
推荐指数
0
解决办法
1480
查看次数

是否可以将云锚点保存到本地存储以供以后使用?

我正在制作一个 AR 应用程序。要求很简单。在“配置阶段”,我启动应用程序并将一个立方体放在房间的地板上,然后将其关闭。稍后,当我再次启动应用程序时,当相机面向同一楼层时,立方体应该保留在那里。根据我找到的信息,没有云锚是不可能的。就我而言,我实际上并不需要在不同用户或不同设备之间共享锚点,我只需要“持久”锚点。

是否可以以某种方式序列化/保存到本地存储并在以后的会话中加载它?

请帮忙确认一下,谢谢!

anchor augmented-reality arcore

7
推荐指数
1
解决办法
1257
查看次数

向 Sceneform 节点添加照明没有效果

我正在关注关于在 SceneView 中将光添加到节点的谷歌开发人员指南:

https://developers.google.com/sceneform/develop/build-scene

Light spotLightYellow =
    Light.builder(this, Light.Type.FOCUSED_SPOTLIGHT)
        .setColor(new Color(android.graphics.Color.YELLOW))
        .setShadowCastingEnabled(true)
        .build();
Run Code Online (Sandbox Code Playgroud)

但是它似乎对我的渲染模型没有任何作用。

还有什么我想念的吗?

 ModelRenderable.builder()
                .setSource(
                        this,
                        Uri.parse(card)
                )
                .build()
                .thenAccept(
                        modelRenderable -> {

                            node.setParent(scene);
                            node.setLocalPosition(vector3);
                            node.setLocalScale(new Vector3(1.4f, 1.4f, 1.4f));
                            node.setName("Test");

                            Light light =
                                   Light.builder(Light.Type.FOCUSED_SPOTLIGHT)
                                   .setColor(new Color(android.graphics.Color.YELLOW))
                                   .setShadowCastingEnabled(true)
                                   .build();

                            node.setLight(light);

                            node.setRenderable(modelRenderable);


                        })
                .exceptionally(
                        throwable -> {
                            Toast toast =
                                    Toast.makeText(this, "Unable to load Fox renderable" + throwable, Toast.LENGTH_LONG);
                            toast.setGravity(Gravity.CENTER, 0, 0);
                            toast.show();
                            return null;
                        });
Run Code Online (Sandbox Code Playgroud)

android sceneview arcore sceneform

7
推荐指数
1
解决办法
309
查看次数

MediaPipe vs MLKit Vision vs ARCore

这 3 个 Google 库之间似乎有很多重叠之处。

根据他们的网站:

  • 媒体管道:MediaPipe offers cross-platform, customizable ML solutions for live and streaming media.

  • AR核心:With ARCore, build new augmented reality experiences that seamlessly blend the digital and physical worlds.

  • MLKit 愿景:Video and image analysis APIs to label images and detect barcodes, text, faces, and objects.

有相关工作经验的人能否解释一下它们之间的关系以及各自的用例是什么?

例如,哪些适合实现面部过滤器等高级流行功能?

(也许还可以了解这 3 者中哪一个最有可能最快登陆 Google Graveyard)

arcore mediapipe google-mlkit

7
推荐指数
1
解决办法
5087
查看次数