以一张实际卡片为锚点,通过笔记本的摄像头,在显示器上将一个计算机内的3d物体显示在卡片上,类似于电影上看到的那种全息投影技术;
1、python环境安装
window10,笔记本自带摄像头,python3.9或3.10均可;
2、opencv安装
pip install opencv-python==4.8.0.74 numpy==1.23.0 --force-reinstall
#pip install opencv-python==4.8.0.74 --upgrade --force-reinstall
python -c "import cv2;lena=cv2.imread('D:/workspace/ai/augmented-reality/d1.png');cv2.imshow('image',lena);cv2.waitKey(0);"
python -c "import cv2; cv2.VideoCapture(0, cv2.CAP_DSHOW)"
如果出不来,报错,如
[ WARN:0@0.209] global cap.cpp:344 cv::VideoCapture::open VIDEOIO(DSHOW): backend is generally available but can't be used to capture by index
Unable to capture video
[ERROR:0@0.178] global obsensor_uvc_stream_channel.cpp:156 cv::obsensor::getStreamChannelGroup Camera index out 文章来源地址https://www.toymoban.com/news/detail-756801.html
文章来源:https://www.toymoban.com/news/detail-756801.html
到了这里,关于十一、增强现实的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!