OpenCVForUnity—MarkerLess AR Example 案例运行流程

1、OpenCVForUnity插件下载与配置
参见博客:https://blog.csdn.net/tpz789/article/details/91171127
2、在Assets→OpenCVForUnity文件夹下,打开ReadMe.pdf;
OpenCVForUnity---MarkerLess AR Example 案例运行分析
将MarkerLess AR Example下载并导入Unity中;
OpenCVForUnity---MarkerLess AR Example 案例运行分析
3、在Project页面,点击过滤器按钮,选择Scene,将本工程的Scene过滤出来;
OpenCVForUnity---MarkerLess AR Example 案例运行分析
OpenCVForUnity---MarkerLess AR Example 案例运行分析
4、File→Build Settings,打开Scenes In Build,将第3步中的5个Scene场景添加到Scenes In Build中,注意将游戏运行的第一个场景拖到最上面,即MarkerLessARExample,其他场景都是由该场景调用的。
OpenCVForUnity---MarkerLess AR Example 案例运行分析
5、双击Assets文件夹中的MarkerLessARExample场景,即可将MarkerLessARExample场景添加到Hierarchy页面,或者将该MarkerLessARExample场景添加到Hierarchy页面;
OpenCVForUnity---MarkerLess AR Example 案例运行分析
6、点击运行图标,弹出如下所示的页面。
OpenCVForUnity---MarkerLess AR Example 案例运行分析
7、点击Show License,展示License说明;
8、点击Texture2D Markerless AR Example,展示单张图片的增强现实;
OpenCVForUnity---MarkerLess AR Example 案例运行分析
9、点击WebCamTexture MarkerLess AR Example,弹出如下界面
OpenCVForUnity---MarkerLess AR Example 案例运行分析
单击Capture Pattern ,将WebCam对准打印在纸上的图像或其他任意景象,按Capture,然后点击保存,即可保存模板图像;
OpenCVForUnity---MarkerLess AR Example 案例运行分析
然后将WebCam对准纸上的图像,即可实现增强现实。Display Axes 是坐标轴,Display Cube是立方体,Display Video是视频。
OpenCVForUnity---MarkerLess AR Example 案例运行分析

相关文章:

  • 2021-08-06
  • 2021-12-29
猜你喜欢
  • 2021-04-17
  • 2021-09-20
  • 2021-04-11
  • 2021-08-16
  • 2022-12-23
  • 2021-08-04
  • 2021-05-27
相关资源
相似解决方案