Skip to content

DaNiKhan-GbR/DaNiKhan-V-Window

DaNiKhan V-Window (Dnkvw)

DaNiKhan Virtual Window: A virtual window just using your webcam.

Homepage Build Issues PRs License

AboutMotiviationUsageRequirementsLinksLicense

About

DaNiKhan Virtual Window (Dnkvw) is a library that allows the easy creation of virtual reality applications that don't require the user to own a headset or other specialized hardware. The resulting application takes the users head movement into account to create a depth effect. For this to work the user only needs a standard webcam.

This library exposes a C and a C++ Interface.

Motiviation

This project was initiated by the VR Project at the FH Wedel. In 2007 Johnny Lee demonstrated a functional prototype for a virtual window using a head mounted Wii remote sensor bar to track the user's head position.

Since then there have been many attempts to recreate or improve upon his solution.

This project aims to create a library enable an easier way to implement a similar virtual window using a standard webcam.

Usage

DaNiKhan V-Window offers a simple API to implement a virtual window using regular off the shelf consumer hardware.

Minimal C Usage:

// Step 1: Include our library
#include <dnkvw/dnkvw.h>

// Step 2: create and configure a new dnkvw context
IDnkvwHandle dnkvw = dnkvw_createContext();
dnkvw_selectDnnTracker(dnkvw);
dnkvw_configureFrustum(dnkvw, windowWidth / (float)windowHeight, nearPlane);

// Step 3: start tracking
dnkvw_startTracking(dnkvw, cameraId);

// Step 4: read values
dnkvw_loadEyeOffset(dnkvw, &eyeOffset.x, &eyeOffset.y, &eyeOffset.z);
dnkvw_loadFrustum(dnkvw, &left, &right, &top, &bottom);

// Step 5: stop & cleanup
dnkvw_stopTracking(dnkvw);
dnkvw_freeContext(&dnkvw);

For more complete in-depth examples look at our demos.

Requirements

You need:

  • OpenCV >= 4.2.0
  • Cmake >= 3.5
  • Webcam with at least 640x480px @ 30 fps

Tested on:

  • Windows 10

Links

License

This project is licensed under the BSD 3-Clause License. See the LICENSE file for details.