5.2 KiB
Mapping Technical Specification
Project
mapping
Purpose
Build a new open-source automatic projection calibration application for Unreal Engine nDisplay.
The application targets a curved projection screen with two projectors, two USB cameras, and Kinect 2.0 depth capture. OAK-D support may be added later. The project must not depend on NVIDIA Quadro/NVAPI hardware warp-blend; generated warp and blend outputs must be software/GPU-shader compatible and usable by Unreal nDisplay.
Product Direction
This is not a manual projection mapping editor. It is an auto-calibrating projection system.
Desired workflow:
- Detect or let the user choose cameras and projector outputs.
- Project GrayCode or other structured-light patterns.
- Capture pattern images from USB cameras.
- Capture depth or point-cloud information from Kinect 2.0.
- Compute projector-camera correspondences.
- Reconstruct or align curved screen geometry.
- Generate per-projector warp geometry.
- Detect projector overlap.
- Generate alpha blend masks.
- Generate beta / black-level compensation masks when possible.
- Export files usable by Unreal Engine nDisplay.
Target Outputs
.pfmwarp geometry files..pngalpha blend masks..pngbeta / black-level masks.- Later: MPCDI export.
- Later: helper
.ndisplayconfig generation.
Hardware Scope
Current hardware:
- 2 USB cameras.
- Kinect 2.0 depth camera.
- 2 projectors.
- Curved screen.
- Optional later OAK-D support.
- Ordinary NVIDIA, AMD, or Intel GPUs.
Explicitly excluded:
- NVIDIA Quadro/NVAPI hardware warp-blend dependency.
Technology Preferences
- C++20.
- CMake.
- OpenCV plus
opencv_contrib. libfreenect2for Kinect v2.- Later
depthai-corefor OAK-D. - OpenGL first for preview/runtime visualization.
- Keep architecture compatible with a future Vulkan backend.
- Qt6 or minimal CLI first; do not spend early time on complex UI.
First MVP
Minimal working prototype:
- One projector.
- One USB camera.
- GrayCode pattern projection.
- Image capture from camera.
- Decode projector-camera correspondences.
- Estimate projector calibration.
- Generate a basic PFM warp map.
- Generate a simple preview image showing the warp result.
Initial Repository Structure
Suggested layout:
apps/calibrator_cli
apps/preview_viewer
libs/camera
libs/projector
libs/structured_light
libs/calibration
libs/depth
libs/warp
libs/blend
libs/ndisplay_export
third_party
data/calibration_sessions
docs
Initial Implementation Tasks
- Create repository skeleton.
- Add CMake configuration.
- Add OpenCV dependency.
- Create USB camera abstraction.
- Create GrayCode pattern generator.
- Create calibration session JSON format.
- Create stub exporters for PFM warp, PNG alpha mask, and PNG beta mask.
- Write README with full project goal and MVP roadmap.
References
The detailed repository study list is stored in the project repository at docs/reference_repositories.md.
Most important repositories to study first:
https://github.com/opencv/opencvhttps://github.com/opencv/opencv_contribhttps://github.com/punpongsanon/graycode-procam-calibrationhttps://github.com/kamino410/procam-calibrationhttps://github.com/sjnarmstrong/gray-code-structured-lighthttps://github.com/microsoft/RoomAliveToolkithttps://github.com/OpenKinect/libfreenect2https://github.com/luxonis/depthai-corehttps://github.com/charlesveasey/ofxWarpBlendhttps://github.com/ChristieDigital/mpcdi
Additional reference areas:
- OpenCV
calib3d,solvePnP, stereo calibration, intrinsics/extrinsics, rectification. opencv_contribstructured light, GrayCode, SinusoidalPattern, ArUco, ChArUco, multi-band blending, seam estimation.- Projector-camera calibration repositories, especially treating the projector as an inverse camera.
- Kinect/OAK-D/RealSense RGBD pipelines and point-cloud APIs.
- RoomAlive-style Kinect-assisted multi-projector calibration.
- MPCDI structure, parsing, rendering, and professional projection workflows.
- Unreal nDisplay projection policies and tracked projection systems.
- Renderer abstraction lessons from bgfx for keeping OpenGL-first code compatible with Vulkan/DX-style backends later.
Related Prior Knowledge
Older ProjectionMapping work on wuu is useful as reference material but should not be treated as the clean architecture for this new project. Prior attempts showed that stereo top/bottom projector output can break full-frame GrayCode assumptions and that solver work is pointless until pattern capture and decoded correspondences are verified.
Relevant knowledge-base entries:
dialog-summaries/2026-05-24-wuu-projectionmapping-kinect-calibration.mdproblems/2026-05-24-projectionmapping-stereo-top-bottom-calibration-failure.mdskills/projectionmapping-manual-kinect-calibration.md
Open Questions
- What should the public repository name be?
- Should the first MVP use only CLI windows/OpenCV display, or include a tiny OpenGL preview app immediately?
- Which package manager should be preferred for dependencies: system installs, vcpkg, Conan, or vendored build instructions?
- What exact nDisplay PFM coordinate convention should be the first supported export target?