Use PapARt as a camera library


#1

Camera for Processing.

PapARt handles many depth camera drivers and enables to grab depth, IR and color images from such cameras.

In this tutorial, we show to access your camera video stream, and use the library only for its camera input features.

Requirements

Here you list the hardware / OS required: e.g.:

  • Hardware: Camera: any webcam, or FLIR/Pointgrey camera.
    or DepthCamera: Kinect for Xbox360/Windows, Intel Realsense, Orbbec Astra.
  • Operating system: Win/OSX/Linux.
  • Language: Processing
  • Time required: 20mins ~ 2hours.
  • Difficulty: medium.

Install the drivers.

If you have webcam that already works in other software, skip this step.

Each vendor provides drivers and examples. These examples need to work before you try to access it in Processing.

If you use linux or OSX, please check for availble packages first.

Choose your driver in PapARt

  1. There is a sketch that assists you for trying different camera inputs, it is available: sketchbook -> papart-exemples -> calibration -> PCConfiguration.

  2. Run the sketch.

  3. In the Camera part (middle of the window), you can select the driver in the list: OpenCV, Processing, OpenKinect etc… Then set the name or camera description. If you have a calibration file associated you can load it, then press the Test the camera button to see the video feed.

Camera driver use.

  • OpenCV: number of the camera (0, 1, etc…)
  • FFMPEG: name of the device: e.g.: /dev/video0 on linux.
  • Processing: name of the device, as found in Examples -> Libraries -> Video -> Capture -> GettingStartedCapture.
  • OpenKinect / OpenNI / Librealsense: number of the camera, you can also specify the video feed: rgb (color) , IR (infrared) or depth for a colored depth map.

When the camera works in PCConfiguration, you can press the Save as default button, and this camera will be use in all the PapARt applications.

Test the camera.

Try this configuration with the SeeThrough example. (papart-examples -> first-examples -> Camera -> SeeThrough.

There are two example to fetch the color stream:

CameraDriver: uses the default configuration to load the camera in a standard sketch.
CameraSimple: It does not use any configuration, minimum Papart impact on the code.

Accessing depth

There are no atomic example yet. However, there are may uses with PapARt, and ways to access the depth data on the table in the DepthCamera examples.

Conclusion

PapARt can be used to manage your cameras and to access color, depth or IR streams from your cameras.


PapARt 1.2 - First wide audience release
Quick start with a webcam
Quick start with a webcam
#2