Magic Mirror is an augmented reality application designed for showing different kinds of media on a display, while a marker is tracked. The display shows the mirrored output of a camera attached to that display. The following kinds of media can be displayed:
- images (also with an alpha-channel, for example in PNG images)
- video (also with an alpha mask like here
- 3D models (in Wavefront OBJ format)
These contents have to be added to the res/contents
folder.
There are two different versions available, using different libraries and with differing development states. Both versions are OpenFrameworks-based applications and use Nate Robins' GLM library for OBJ Wavefront fromat model loading.
This Version uses the ArUco library for marker recognition and OpenGL for display.
The content folders have to follow naming convention to associate the content with a marker ID and a content type:
res/contents/<id>_<type>_<name>/<name>.<ext>
- image example:
res/contents/42_img_helloworld/helloworld.png
Where id is the marker ID and type can be either img, vid or obj. You can set name as you wish.
Get more detailed Information here.
This Version uses the ARToolKitPlus library for marker recognition and OpenGL for display.
The content folder includes a config.xml file, where you can add or change the loaded content, associate with a marker ID. There are several options to specify the content type (img, vid or obj), the file locations, the scaling factor, an initial rotation and translation in 3D space and if you want the content to be shown with transparency.
Get more detailed Information here.
To compile the project, you must have a folder ofx
in the project root containing (or linking to) the openFrameworks library. This project has been successully compiled under Mac OSX 10.8 with openFrameworks v0.8.
Note that you should modify src/conf.h
for the proper camera device ID and camera resolution. You should also calibrate your camera and save the intrinsic matrix output to res/cams
.
The program is released under BSD 3-clause license which is contained in the file LICENSE
.
The included ArUco library is developed by the Universidad de Córdoba. The included ARToolKitPlus library is released under GNU GPL v3 license. ARToolKit was originally developed by Hirokazu Kato of Nara Institute of Science and Technology and was released by the University of Washington HIT Lab. Currently it is maintained as an opensource project hosted on SourceForge.