android - 应用程序本地的增强图像 [ARCore]
问题描述
我有一个位于本地目录 [drawable 文件夹] 中的图像,所以将此图像放在 ImageView 中,我什至设置了一些与本地图像相对应的本地模型(sfb 对象)。所以我的问题是如何检测页面内的图像?
我的活动 xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<FrameLayout
android:id="@+id/frame_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<fragment
android:id="@+id/ux_fragment"
android:name="*****.CustomArFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<ImageView
android:id="@+id/image_view_news"
android:layout_width="350dp"
android:layout_height="500dp"
android:layout_gravity="center"
android:src="@drawable/news_paer_image"
android:visibility="gone" />
</FrameLayout>
</LinearLayout>
在自定义片段上,我已经设置了会话和配置
Config config = new Config(session);
config.setUpdateMode(Config.UpdateMode.LATEST_CAMERA_IMAGE);
config.setFocusMode(Config.FocusMode.AUTO);
session.configure(config);
this.getArSceneView().setupSession(session);
((MainActivity) getActivity()).setUpNewLetter(config, session);
任何形式的帮助都将不胜感激。
谢谢
解决方案
推荐阅读
- windows - 如何通过 .msi 安装程序在 Windows 10 中使用 redis
- laravel - Laravel PrivateChannel 认证逻辑
- javascript - 如何通过 react-jvectormap 从 React 中的 jVectorMap 通过国家可视化获取示例 GDP
- python - 在乘客 wsgi 上找不到模块
- reactjs - 如何在 redux saga 上测试超时
- javascript - HTML 和 Javascript,带有两个按钮和一个在程序开始时显示“0”的显示面板,
- neo4j - neo4j 在一个子查询中进行两个全文搜索
- python - python linting 和子类属性
- java - cf run-task 是否需要在运行前上传环境/脚本?优雅的方式?
- unity3d - Unity3D editor: Rendering nested elements in sidebar