十一、增强现实

        以一张实际卡片为锚点,通过笔记本的摄像头,在显示器上将一个计算机内的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:[email protected]] 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:[email protected]] global obsensor_uvc_stream_channel.cpp:156 cv::obsensor::getStreamChannelGroup Camera index out

你可能感兴趣的:(AI图像处理模型与应用,ar,虚拟现实,vr,python,opencv)