Using an actual card as the anchor point, through the laptop's camera, a 3D object in the computer is displayed on the card on the monitor, similar to the holographic projection technology seen in movies; 1. Install window10 in the python environment
,
laptop Bring your own camera, either python3.9 or 3.10 is acceptable;
2. Opencv installation
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)"
If it cannot come out, an error will be reported, such as
[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
11. Augmented reality
Guess you like
Origin blog.csdn.net/vandh/article/details/131696748
Recommended
Ranking