Quick start with a webcam
If you want to try out PapARt for a first AR applicaton, this is the right place !
In this tutorial we install Processing and Papart, then try the first example application.
Here you list the hardware / OS required: e.g.:
- Hardware: Webcam, printer.
- Operating system: Win/OSX/Linux.
- Language: Processing
- Time required: 0.5 hour to 2 hours.
- Difficulty: easy.
Guide tested on: Windows 10 64bits, Linux x64 (Manjaro).
Step 1: Processing and libraries.
You need first to install Processing for you system. Once it is installed you need to run it once so that it creates all the folders. Some libraries are
Then download and install the PapARt library.
PapARt requires additonal libraries here is the collection: link. It is used for math, network, 3D, and GUI. It includes well known Processing libraries: PeasyCam, OSCP5, Video, Toxiclibs. And custom ones: SVGExtended, ProcessingTUIO, Skatolo, GuiModes, and Reflections.
You will also need the Video library, and for some examples sound, they are available through Processing:
Sketch -> Import Library -> Add a Libraryor directly here.
The last library is JavaCV, it embeds OpenCV (C++) pre-compiled. Consequenly you need to download the right package for your platform:
- All architectures
- Windows 64 bits, please use all architecture for now.
- Linux x86_64
- Mac OSX: test required, use all architecture.
- Experimental: armhf / Raspberry pi, android (not up to date). Use all architecture.
All these libraries must be installed in your
- Linux: /home/toto/sketchbook/libraries.
- OSX /Documents/Processing/libraries.
- Windows: /My Documents/Processing/libraries.
- Download the PapARt examples, and extract them in your
You need to restart processing after installing a new library, or adding sketches.
Before going to the next step:
Start Processing, then go to menu
File -> Examples. Then in the pop-up, expand the folder
Contributed libraries. You should see most of the installed libraries:
SVGExtended etc… If not check that you installed the libraries correcty. You can follow this official guide to install libraries.
Step 2: Libraries test.
Launch the example
Sketchbook -> PapARt-examples -> first-examples -> Debug -> simple. Run the example. You might get warnings:
No library found for org.bytedeco.javacpp.opencv_core
Please ignore them, these is an issue open to fix this. It is just debug text.
Step 3: Camera test.
Print the markerboard: You can find it in
libraries\PapARt\data\markers\A4-default.pdfor online on github: download link.
Launch the example
Sketchbook -> PapARt-examples -> first-examples -> Camera -> SeeThrough. Run the example, and show the printed sheet in front of the camera.
You can download presets for many cameras and copy it to
sketchbook/libraries/PapARt/data/calibration/cameraConfiguration.xml (right click, save as):
The configurations are discussed on the camera library usage thread.
Q: The app crashed, it could not start the camera.
A: You need to check the cable, and choose the right driver, as explained on this thread.
Q: I have two cameras, and I want to use the other one.
A: You can specify the camera name, or number depending on the driver. It is explained on this thread.
Q: I did not try yet, is my camera supported ?
A: Yes most likely.
Now you have a fully working PapARt system for “see through” applications. You can try the
other “Camera” examples in
Papart-examples -> First examples -> Camera. If you want a deeper view of PapARt possiblites you can look at
PapARt -> features -> advancedUses. Most of the adanced examples use a single webam for compatibility.
AR applications in PapARt follow a particular design, the tutorials are here to help. We encourage you to read about the Papart helper, the display model, and the PaperScreen abstraction.
The next step is to calibrate your camera, a link to the calibration guide will be posted here.
About the author: Jeremy Laviole is the main developper of PapARt and promotes open source technologies for educational and professionnal uses at RealityTech.