Record wuu ProjectionMapping calibration pass
This commit is contained in:
parent
e4a000ddfb
commit
7585c71a7a
7 changed files with 229 additions and 0 deletions
|
|
@ -0,0 +1,81 @@
|
|||
# 2026-05-24 ProjectionMapping wuu Calibration Dialogue Summary
|
||||
|
||||
## Project
|
||||
|
||||
Garage.
|
||||
|
||||
## Machine
|
||||
|
||||
`wuu`, Windows, local ProjectionMapping work under `C:\git`.
|
||||
|
||||
## User Goal
|
||||
|
||||
Run `ProjectionMapping-webcam` and step through projector calibration with screenshots at each stage.
|
||||
|
||||
## Durable Context
|
||||
|
||||
- Active working copy: `C:\git\ProjectionMapping-webcam`.
|
||||
- The copy is not a Git repository.
|
||||
- App launched successfully with `run.bat`.
|
||||
- Server was started in the app with localhost enabled on UDP `27015`.
|
||||
- Two Optoma 1920x1080 displays were marked as local projectors; the BenQ primary monitor was left unmarked.
|
||||
- Kinect 2.0 was used as the active RGB-D camera.
|
||||
- `Show RGB overlay` and `View through Kinect RGB` worked and allowed manual visual alignment in the main viewport.
|
||||
- `assets\models\screenMerc3.fbx` was used as the screen object and marked trackable.
|
||||
- Manual RGB alignment was used because depth correspondences remained `0`.
|
||||
- A close manual transform for `screenMerc3` was:
|
||||
|
||||
```text
|
||||
Position: -0.400, -0.690, -3.400
|
||||
Rotation: 359.300, 276.000, 0.300
|
||||
Scale: 0.970, 0.970, 0.970
|
||||
```
|
||||
|
||||
## Calibration Result
|
||||
|
||||
- `Project calibration patterns` changed the physical projector images.
|
||||
- Pattern capture completed and set `Pattern captures = Ready`.
|
||||
- Saved capture path: `C:\git\ProjectionMapping-webcam\calibration_temp\Sun_May_24_20.58.26_2026`.
|
||||
- Two projector directories were present, each with 46 `image*.png` files.
|
||||
- Contact-sheet inspection showed visible vertical and horizontal gray-code stripes, so the projected pattern/camera capture path was working.
|
||||
- Solver failed for both projector IDs:
|
||||
|
||||
```text
|
||||
Could not choose a unique projector pose seed. Scores: 0, 0, 0, 0
|
||||
```
|
||||
|
||||
- The app then crashed in `ucrtbase.dll` with exception `0xc0000409`.
|
||||
|
||||
## Local Code Change
|
||||
|
||||
After the crash, `C:\git\ProjectionMapping-webcam\src\calibration\calibration.cpp` was patched locally to:
|
||||
|
||||
- log seed correspondence counts:
|
||||
|
||||
```text
|
||||
Projector '<id>' seed correspondences: decoded=<n>, on model=<n>
|
||||
```
|
||||
|
||||
- skip seed/solver when fewer than 8 valid model/projector correspondences remain;
|
||||
- log if calibration produces no valid results.
|
||||
|
||||
Release x64 rebuild succeeded after this change.
|
||||
|
||||
## Next Actions
|
||||
|
||||
1. Relaunch `C:\git\ProjectionMapping-webcam`.
|
||||
2. In `Projection Mapping > Local projectors`, mark only one Optoma as projector.
|
||||
3. Clear pattern captures.
|
||||
4. Capture patterns for that single projector.
|
||||
5. Run solver and inspect `decoded` vs `on model` correspondence counts.
|
||||
6. If one projector calibrates, repeat for the second.
|
||||
7. If `decoded` is high but `on model` is low, improve manual alignment or inspect camera/model coordinate assumptions.
|
||||
|
||||
## Related Knowledge Updates
|
||||
|
||||
- `projects/garage/status.md`
|
||||
- `projects/garage/repositories.md`
|
||||
- `projects/garage/agent-log.md`
|
||||
- `locations/wuu.md`
|
||||
- `problems/2026-05-24-projectionmapping-stereo-top-bottom-calibration-failure.md`
|
||||
- `skills/projectionmapping-manual-kinect-calibration.md`
|
||||
|
|
@ -166,6 +166,17 @@
|
|||
- Build state: Release x64 build verified on 2026-05-24 after copying minimal HLSL/MSVC build fixes from the experimental tree.
|
||||
- Run helper: `run.bat` added locally to set `PATH=ext\bin`.
|
||||
- Later 2026-05-24 state: Kinect-oriented source/shader/tracking layers from `C:\git\ProjectionMapping` were copied into this working copy to keep the project close to original RGB-D architecture while using Kinect 2.0.
|
||||
- 2026-05-24 evening calibration pass:
|
||||
- Launch: `C:\git\ProjectionMapping-webcam\run.bat`.
|
||||
- Build: Release x64 with MSBuild v143 succeeded after adding diagnostics in `src\calibration\calibration.cpp`.
|
||||
- Server: localhost enabled, UDP `27015`, network button shows `Stop` while running.
|
||||
- Displays: BenQ primary monitor left unmarked; two Optoma 1920x1080 monitors marked as local projectors.
|
||||
- Kinect 2.0: RGB/depth ready (`Color 1920x1080`, `Depth 512x424` in wizard); `Show RGB overlay` and `View through Kinect RGB` worked for manual alignment.
|
||||
- Trackable object: `assets\models\screenMerc3.fbx`, marked trackable in the Scene panel.
|
||||
- Manual alignment: use `Manual RGB alignment` / `Use current manual alignment`; correspondences may remain `0` because the pass is relying on manual alignment rather than trusted depth tracking.
|
||||
- Pattern capture: two projector directories with 46 images each were saved under `C:\git\ProjectionMapping-webcam\calibration_temp\Sun_May_24_20.58.26_2026`; visible stripes confirmed real pattern changes.
|
||||
- Failure: solver reported `Could not choose a unique projector pose seed. Scores: 0, 0, 0, 0` and the pre-fix executable crashed in `ucrtbase.dll` with `0xc0000409`.
|
||||
- Next: test one Optoma at a time. Clear pattern captures before each run; after the local diagnostic build, watch for `seed correspondences: decoded=<n>, on model=<n>` to decide whether manual alignment/model visibility is the blocker.
|
||||
- Read/write: verified locally.
|
||||
|
||||
### `Kamaz_Cleaner-qore-wuu-smb`
|
||||
|
|
|
|||
|
|
@ -16,13 +16,23 @@ More or fewer than one combination is valid
|
|||
|
||||
Pattern capture folders existed, but captured frames appeared not to contain useful gray-code differences.
|
||||
|
||||
Later on 2026-05-24, after moving to `C:\git\ProjectionMapping-webcam` and using Kinect 2.0 with manual RGB alignment, pattern frames did contain visible gray-code differences, but the same seed failure remained:
|
||||
|
||||
```text
|
||||
Could not choose a unique projector pose seed. Scores: 0, 0, 0, 0
|
||||
```
|
||||
|
||||
The app then crashed in `ucrtbase.dll` with Windows exception `0xc0000409`, likely from an assert/abort path after failed calibration.
|
||||
|
||||
## Environment
|
||||
|
||||
- Machine: `wuu`
|
||||
- Project: `garage`
|
||||
- Local repository: `C:\git\ProjectionMapping`
|
||||
- Later working copy: `C:\git\ProjectionMapping-webcam` (not a Git repository)
|
||||
- Tool: DirectX12 ProjectionMapping app
|
||||
- Hardware context: two projector/monitor outputs; user reported projectors were running in stereo `top/bottom` mode.
|
||||
- Later working state: two Optoma displays marked as projectors, Kinect 2.0 RGB/depth ready, `screenMerc3.fbx` manually aligned with the Kinect RGB overlay.
|
||||
|
||||
## Root Cause
|
||||
|
||||
|
|
@ -30,6 +40,8 @@ The calibration code assumes that a projector receives and displays a full-frame
|
|||
|
||||
This can make captured pattern images look nearly unchanged or decode to ambiguous/zero scores, so the solver cannot choose a unique projector pose seed.
|
||||
|
||||
If captured frames do show clear gray-code differences but pose seed still fails, the problem has moved downstream: decoded camera/projector correspondences are probably not landing on valid rendered model pixels, or the model/camera/projector coordinate assumptions are inconsistent. In that case, inspect the number of decoded correspondences that survive the rendered model mask before running Ceres.
|
||||
|
||||
## Solution Direction
|
||||
|
||||
Do not trust projector calibration results until output layout is explicit.
|
||||
|
|
@ -44,6 +56,19 @@ Add projector output layout support before calibration:
|
|||
|
||||
For a first recovery pass, disable stereo layout and calibrate one full-frame projector region if the hardware allows it. If stereo cannot be disabled, crop or target the correct top/bottom region during pattern generation and decoding.
|
||||
|
||||
For the `ProjectionMapping-webcam` Kinect/manual alignment pass, the immediate recovery path is:
|
||||
|
||||
1. Mark only one Optoma as `Is projector`.
|
||||
2. Clear pattern captures.
|
||||
3. Capture patterns for that single projector.
|
||||
4. Run calibration and inspect the new diagnostic log:
|
||||
|
||||
```text
|
||||
Projector '<id>' seed correspondences: decoded=<n>, on model=<n>
|
||||
```
|
||||
|
||||
If `decoded` is high but `on model` is low, fix manual object alignment, model scale/orientation, camera view/intrinsics, or the rendered point-cloud mask before changing solver settings. If both are high but pose seed still scores `0,0,0,0`, inspect coordinate handedness/orientation and projector/camera intrinsics.
|
||||
|
||||
## Verification
|
||||
|
||||
Before running Ceres/solver:
|
||||
|
|
@ -56,9 +81,12 @@ Before running Ceres/solver:
|
|||
|
||||
If pattern frames are nearly identical, fix projection/capture/layout first; solver changes will not help.
|
||||
|
||||
For the later `ProjectionMapping-webcam` run, contact-sheet inspection of `calibration_temp\Sun_May_24_20.58.26_2026` showed visible vertical and horizontal gray-code stripes in both projector capture folders, so the next blocker was not "no projected pattern" but correspondence/geometry validity.
|
||||
|
||||
## Related Files
|
||||
|
||||
- `C:\git\ProjectionMapping\AGENTS.md`
|
||||
- `C:\git\ProjectionMapping-master\AGENTS.md`
|
||||
- `C:\git\ProjectionMapping-webcam\src\calibration\calibration.cpp`
|
||||
- `projects/garage/repositories.md`
|
||||
- `locations/wuu.md`
|
||||
|
|
|
|||
|
|
@ -1,5 +1,14 @@
|
|||
# Garage Agent Log
|
||||
|
||||
## 2026-05-24 - wuu ProjectionMapping Kinect Manual Calibration Pass
|
||||
|
||||
- Machine: `wuu`.
|
||||
- Agent: Codex.
|
||||
- Summary: Continued projector calibration in `C:\git\ProjectionMapping-webcam` using Kinect 2.0 and manual RGB alignment. Launched through `run.bat`; localhost server ran on UDP `27015`; two Optoma 1920x1080 displays were marked as local projectors; `screenMerc3.fbx` was loaded, marked trackable, and manually aligned through `Show RGB overlay` / `View through Kinect RGB`.
|
||||
- Calibration result: Pattern capture succeeded visibly on physical projectors and saved two projector capture folders with 46 `image*.png` frames each. Contact-sheet inspection showed real gray-code stripes, but solver initialization failed for both projector IDs with `Could not choose a unique projector pose seed. Scores: 0, 0, 0, 0`.
|
||||
- Crash/fix: The pre-fix executable crashed after the failed solver path (`ucrtbase.dll`, exception `0xc0000409`). Added a local diagnostic/guard patch to `C:\git\ProjectionMapping-webcam\src\calibration\calibration.cpp` to log decoded vs on-model seed correspondences, skip seed/solver when too few valid correspondences remain, and report empty calibration results. Release x64 rebuild succeeded.
|
||||
- Next handoff: Relaunch `C:\git\ProjectionMapping-webcam`, calibrate one Optoma projector at a time, clear pattern captures before each run, and inspect the new `seed correspondences: decoded=<n>, on model=<n>` log to decide whether the blocker is pattern decoding or model/camera geometry.
|
||||
|
||||
## 2026-05-24 - wuu LAN Connectivity And VNC Capability
|
||||
|
||||
- Machine: `wuu`.
|
||||
|
|
|
|||
|
|
@ -402,6 +402,16 @@ Write means a temporary local probe file could be created and removed. No projec
|
|||
- Test command: no automated tests identified.
|
||||
- Notes: use this as the next ProjectionMapping pass for a normal webcam/manual calibration workflow. Avoid importing Kinect/depth changes by default.
|
||||
- Latest 2026-05-24 note: after the user requested staying closer to original RGB-D architecture and using Kinect, `src`, `shaders`, `premake5.lua`, and `run.bat` were synced from `C:\git\ProjectionMapping`. The working copy now starts with Kinect 2.0 support and should not be described as pure webcam/color-only.
|
||||
- Later 2026-05-24 calibration state:
|
||||
- App launched from `C:\git\ProjectionMapping-webcam\run.bat`; running executable path was `C:\git\ProjectionMapping-webcam\bin\Release_x86_64\ProjectionMapping.exe`.
|
||||
- Server ran locally on UDP `27015` with `Localhost` enabled and IP `127.0.0.1`.
|
||||
- Windows display layout on `wuu`: primary BenQ at `DISPLAY1` (`0,0,1920x1080`), Optoma projectors at `DISPLAY3` (`1920,0,1920x1080`) and `DISPLAY2` (`3840,0,1920x1080`). In ProjectionMapping, BenQ was unmarked and both Optoma displays were marked as projectors.
|
||||
- Kinect 2.0 color was visible in `Color image` and as `Show RGB overlay`; `View through Kinect RGB` worked and made the viewport usable for manual alignment.
|
||||
- `screenMerc3.fbx` was loaded from `assets\models`, marked trackable, and manually aligned to the real curved screen through the Kinect RGB overlay. Example manual transform near the last attempt: position `(-0.400, -0.690, -3.400)`, rotation `(359.300, 276.000, 0.300)`, scale `(0.970, 0.970, 0.970)`.
|
||||
- Pattern capture succeeded visibly on the physical projectors and saved two projector directories under `calibration_temp\Sun_May_24_20.58.26_2026`, each with 46 `image*.png` captures. Contact-sheet inspection showed real vertical/horizontal gray-code stripes.
|
||||
- Solver still failed with `Could not choose a unique projector pose seed. Scores: 0, 0, 0, 0` for both projector IDs and then the app crashed in `ucrtbase.dll` with Windows exception `0xc0000409`.
|
||||
- Local code change made after the crash: `src\calibration\calibration.cpp` now logs decoded vs on-model seed correspondences, skips seed/solver when fewer than 8 valid correspondences remain, and logs when no valid calibration results are produced. Release x64 rebuild succeeded after this change.
|
||||
- This working copy is not a Git checkout, so these local edits must be copied/committed elsewhere if they should become permanent source changes.
|
||||
|
||||
### `Kamaz_Cleaner-qore-wuu-smb`
|
||||
|
||||
|
|
|
|||
|
|
@ -11,5 +11,6 @@
|
|||
- `mcp-server-management.md` - how agents keep a shared MCP server set synchronized across machines.
|
||||
- `dialog-summary-import.md` - how agents summarize useful context from separate dialogues into this repository.
|
||||
- `remote-visual-access.md` - how agents set up webcams/cameras and VNC for remote visual analysis and control.
|
||||
- `projectionmapping-manual-kinect-calibration.md` - current `wuu` ProjectionMapping/Kinect manual alignment and projector calibration workflow, including the one-projector troubleshooting path.
|
||||
- `multi-machine-agent-orchestration.md` - how to coordinate agents and daemon-like workers across multiple computers.
|
||||
- `ssh-public-key-access.md` - how to exchange and install SSH public keys without storing private keys or passwords.
|
||||
|
|
|
|||
89
skills/projectionmapping-manual-kinect-calibration.md
Normal file
89
skills/projectionmapping-manual-kinect-calibration.md
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
# 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:
|
||||
|
||||
```powershell
|
||||
.\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:
|
||||
|
||||
```text
|
||||
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:
|
||||
|
||||
```text
|
||||
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:
|
||||
|
||||
```text
|
||||
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.
|
||||
Reference in a new issue