A cross-platform Augmented Reality library written in C++11.
Strongly WIP, so don't expect to use this for anything real at the moment. :)
- Supported platforms:
- Linux
- Windows
- Android
- iOS
- Unity3D-plugin (Windows, Linux and Android). Unity 5.3 required.
- Extendable pipeline architechture (see Architechture)
- Marker tracking: multiple markers
- OpenGL-rendering: only simple 3D-shapes supported for the moment
- Support for sensor data:
- Android: gyroscope, rotation vector (virtual sensor)
- Support for more trackers
- SLAM
- Edge-based
- Face
- Platform support for OSX (native and Unity3D-plugin)
- Platform support for iOS-Unity3D-plugin
- Improved marker detection / different marker data-fields
- Support for a proper rendering-library (Ogre3D or OpenSceneGraph)
Yarrar is modeled as a pipeline, which consists of four stages. Each stage has one or more stage-handlers, which process the data from previous stage and pass it forward to next stage. Pipeline configuration is done with JSON-based configuration file (see Pipeline Configuration for details). Pipeline stages are:
- Dataprovider: Sensor data handling (ie. RGB-camera, depth-camera, accelerometer, gyroscope)
- Tracker: Pose tracking (ie. using markers, SLAM)
- SensorFusion: Pose accuracy improvement
- Render: Rendering the 3D-models on top of camera image
Limitations in current implementation:
- Only one dataprovider with RGB_CAMERA_FLAG set is supported
- SensorFusion-stage is WIP
Yarrar depends heavily on C++11-features, so a fairly recent compiler is needed.
Library dependencies per compilation target:
Platform | OpenCV 3.0 | json11 | eigen | GLEW | GLFW |
---|---|---|---|---|---|
Linux | X | X | X | X | X |
Windows | X | X | X | X | X |
Android | X | X | X | ||
iOS | X | X | X | ||
Unity3D (Windows) | X | X | * | ||
Unity3D (Android) | X | X | * |
* Currently not needed (doesn't support sensor fusion), but will become a dependency in the future.
See Compiling for detailed instructions
Compile and run tests on Linux:
mkdir build
cd build
cmake ..
make
make test ARGS="-V"
- Build AAR (see Compiling).
- If you built it with build_aar.sh-script, .aar gets automatically copied to example/android/app/libs.
- Open and build example/android with gradle or Android studio.
- Build Yarrar.framework (see Compiling).
- Copy Yarrar.framework to example/ios-directory.
- Open and build example/ios/yarrarexample.xcodeproj with Xcode.
- See Quickstart. It will also compile example/desktop_webcam-example by default.
- Compile yarrar.unitypackage (see Compiling).
- Open up example/unity in Unity Editor. Basic structure should be set up.
- When importing yarrar.unitypackage to Unity on Linux following error might appear:
Multiple plugins with the same name 'libyarrar' (found at 'Assets/yarrar/Plugins/x86_64/libyarrar.so' and 'Assets/yarrar/Plugins/Android/libyarrar.so'). That means one or more plugins are set to be compatible with Editor. Only one plugin at the time can be used by Editor.*
Fix this by deleting yarryar/Plugins/x86_64 if you wish to deploy to Android or yarryar/Plugins/Android if you wish to deploy to Linux.
- Deploying to Android might fail, if you don't set correct architecture for .so-library. This can be done by selecting libyarrar.so-file from Project-view and setting CPU to ARMv7 from Inspector-window.