This repository has been archived on 2026-07-09. You can view files and clone it, but cannot push or open issues or pull requests.
agent-knowledge-base-archived/skills/projectionmapping-manual-kinect-calibration.md

3.4 KiB

ProjectionMapping Manual Kinect Calibration Workflow

Use this workflow when continuing the garage ProjectionMapping calibration pass on wuu with Kinect 2.0 and manual RGB alignment.

Preconditions

  • Use C:\git\ProjectionMapping-webcam.
  • Launch with:
.\run.bat
  • Kinect 2.0 should be the active camera.
  • In the wizard, the camera step should show approximately:
    • Color: 1920x1080
    • Depth: 512x424
  • Use LAN/local projector control only unless the user asks otherwise.
  • For first calibration, avoid projector stereo top/bottom; use full-frame output where possible.

Projector Setup

  1. Start the local server in Projection Mapping.
  2. Prefer Localhost enabled, IP 127.0.0.1, UDP port 27015.
  3. In Projection Mapping > Local projectors, mark only projector displays as Is projector.
  4. On wuu, the observed layout was:
    • BenQ primary monitor: do not mark as projector.
    • Two Optoma Generic PnP Monitor (1920x1080) displays: mark as projectors.
  5. For troubleshooting, calibrate one Optoma at a time.

Object Setup

  1. Load assets\models\screenMerc3.fbx or the correct screen mesh.
  2. Select it in the Scene panel.
  3. Click Make this object trackable.
  4. In Tracker, enable Show RGB overlay.
  5. Press View through Kinect RGB if available.
  6. Set RGB overlay opacity around 0.45 so both the camera image and 3D model are visible.
  7. Manually align the mesh so the red outline matches the physical screen in the Kinect RGB image.
  8. In the wizard, use Use current manual alignment / Manual RGB alignment.

Observed approximate screenMerc3 transform from one close alignment:

Position: -0.400, -0.690, -3.400
Rotation: 359.300, 276.000, 0.300
Scale:    0.970, 0.970, 0.970

Treat this as a starting point only; real camera/projector placement changes it.

Pattern Capture

  1. Go to Calibration Wizard > Patterns.
  2. Click Clear pattern captures.
  3. Click Project calibration patterns.
  4. Do not touch the camera, projector, or screen during capture.
  5. Confirm physical projector images change with black/white or gray-code stripes.
  6. Inspect calibration_temp; a successful capture for 1920x1080 projectors should create one directory per marked projector with 46 image*.png files.

Before Running Solver

If calibration fails with:

Could not choose a unique projector pose seed. Scores: 0, 0, 0, 0

check whether pattern frames actually differ. If they do, inspect geometry/correspondence validity, not only projector output.

The local diagnostic build in C:\git\ProjectionMapping-webcam logs:

Projector '<id>' seed correspondences: decoded=<n>, on model=<n>
  • High decoded, low on model: manual mesh alignment, model orientation/scale, rendered point-cloud mask, or camera intrinsics/view are likely wrong.
  • Low decoded: projector pattern capture, camera exposure, projector selection, or stereo layout is likely wrong.
  • High both but scores still zero: inspect coordinate handedness/orientation and projector/camera intrinsics.

Known Local Fix

After a crash on 2026-05-24, C:\git\ProjectionMapping-webcam\src\calibration\calibration.cpp was patched locally to:

  • log decoded vs on-model seed correspondences;
  • skip seed/solver when fewer than 8 valid correspondences remain;
  • log when calibration produces no valid results.

C:\git\ProjectionMapping-webcam is not a Git checkout, so copy this fix into the source-of-truth repository if it should persist.