This project was built for the MediCSS summer school 2015-2017
The aim was to demo some features of VTK, OpenCV and ArUco.
bardGrabber
uses OpenCV video source to grab a single frame and save to file. For now, camera calibration should be done externally.bard
performs the following:- launches a single QVTKWidget
- creates an OpenCV VideoSource (e.g. from webcam).
- displays semi-transparent video in foreground vtkRenderer
- overlays vtkPolyData
- loads references models (3D coordinates and point ID) of ArUco boards.
- uses ArUco/OpenCV to track ArUco boards
- provides a modified VTK camera that uses the calibrated intrinsic parameters
- moves the VTK camera according to a registration transformation from 3D reference model coordinates to 2D coordinates of ArUco markers
- tracks a single pointer, made using a separate ArUco marker
bardPivotCalibration
does pivot calibration to create a pointer object. See Feuerstein 2008.bardProcrustes
does point based registration (Procrustes analysis). See Arun 1987.bardCameraCalibration
does intrinsic camera calibration, based on OpenCV. See OpenCV.
- CMake version: 3.1+
- Qt version: Tested with 4.8.7 or 5.4.2. If you go much newer then Qt 5.4.2 you will probably have to build Qt to ensure it has QtWebkitWidgets
- Ensure qmake is on your PATH
- Install git bash from http://git-scm.com
Currently tested on:
- Mac OSX 10.10.5, Qt 4.8.7, CMake 3.1.2, clang 600.0.57
- Windows, Qt 5.4.0, Visual Studio 2013.
Notes:
- BUILD_SHARED_LIBS must be ON due to duplicate symbols in ArUco.
- Supervisor should explain the SuperBuild (a.k.a MetaBuild) and BARD-build folder structure.
- On Windows, StartVS_Debug.bat / StartVS_Release.bat in build folder should be used to launch Visual Studio.
- On Linux and Mac, once compiled, you will probably have to set LD_LIBRARY_PATH or DYLD_LIBRARY_PATH (Mac) to find libraries such as ArUco, VTK, OpenCV and Qt.
git clone https://github.com/MattClarkson/BARD.git
mkdir BARD-SuperBuild-Debug
cd BARD-SuperBuild-Debug
ccmake ../BARD
(set some options, most likely for Qt)
make