Very basic project which might server as a template for augmented reality scenes using OpenSceneGraph for 3D Visualisation and OpenCV to grab webcam frames for the background.
Note: The model was just placed nice "manually" by moving the camera, this project does not contain any real AR-functionality (e.g. markers or tracking).
- Cmake
- OpenCV
- OpenSceneGraph
- to see the sample model, you need OpenSceneGraph-Data set to OSG_FILE_PATH (see this link)
- clone or download and extract project:
git clone https://github.com/Saiheng/OSG-OpenCV-ARDemo/ - switch to project directory:
cd OSG-OpenCV-ARDemo/ - create build folder:
mkdir buildcd build/ - make project:
cmake .. - compile:
make - finally, to run the code use:
./osg_ar_demo(you need a webcam to see live background)
The implementation might not be optimal in performance, defining an own osg::ImageStream might be better. If you have any enhancements, feel free to contribute.
