Record mapping vcpkg hardware probe verification
This commit is contained in:
parent
3d655b2beb
commit
fa5463408a
3 changed files with 102 additions and 10 deletions
|
|
@ -0,0 +1,64 @@
|
|||
# vcpkg Selects Visual Studio 18 And libjpeg-turbo Fails
|
||||
|
||||
## Date
|
||||
|
||||
2026-05-24
|
||||
|
||||
## Reusable
|
||||
|
||||
Yes.
|
||||
|
||||
## Environment
|
||||
|
||||
- Windows development machine.
|
||||
- Visual Studio 2022 Community and Visual Studio 18 Community both installed.
|
||||
- Project: `mapping`.
|
||||
- Dependency manager: `vcpkg`.
|
||||
- Package chain: `opencv4[contrib]` -> `libjpeg-turbo`.
|
||||
|
||||
## Symptoms
|
||||
|
||||
Running:
|
||||
|
||||
```powershell
|
||||
C:\git\vcpkg\vcpkg.exe install --triplet x64-windows
|
||||
```
|
||||
|
||||
selected Visual Studio 18:
|
||||
|
||||
```text
|
||||
Compiler found: C:/Program Files/Microsoft Visual Studio/18/Community/VC/Tools/MSVC/14.51...
|
||||
```
|
||||
|
||||
The build failed while compiling `libjpeg-turbo` Release. The log showed a failed `cl.exe` invocation with no useful diagnostic beyond a single `N` line.
|
||||
|
||||
## Root Cause
|
||||
|
||||
`vcpkg` auto-selected the newer Visual Studio 18 installation instead of the stable Visual Studio 2022 toolchain used by the project. The selected compiler/toolchain failed on the `libjpeg-turbo` dependency.
|
||||
|
||||
## Solution
|
||||
|
||||
Force vcpkg to use Visual Studio 2022:
|
||||
|
||||
```powershell
|
||||
$env:VCPKG_VISUAL_STUDIO_PATH="C:\Program Files\Microsoft Visual Studio\2022\Community"
|
||||
C:\git\vcpkg\vcpkg.exe install --triplet x64-windows
|
||||
```
|
||||
|
||||
For CMake presets, set:
|
||||
|
||||
```json
|
||||
"environment": {
|
||||
"VCPKG_VISUAL_STUDIO_PATH": "C:/Program Files/Microsoft Visual Studio/2022/Community"
|
||||
}
|
||||
```
|
||||
|
||||
## Verification
|
||||
|
||||
After setting `VCPKG_VISUAL_STUDIO_PATH`, `vcpkg install --triplet x64-windows` completed successfully for `opencv4[contrib]`, including `libjpeg-turbo`, and the `mapping` project configured and built with Visual Studio 2022.
|
||||
|
||||
## Related Files
|
||||
|
||||
- `C:\git\mappping\CMakePresets.json`
|
||||
- `C:\git\mappping\vcpkg.json`
|
||||
- `C:\git\mappping\docs\step_01_hardware_probe.md`
|
||||
|
|
@ -33,3 +33,32 @@ Implemented first testable step in `mapping` commit `77b1a65`:
|
|||
- `docs/step_01_hardware_probe.md`
|
||||
|
||||
Local configure check used Visual Studio CMake at `C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe`. The compiler was detected, but configure failed because `OpenCVConfig.cmake` was not found. Next handoff: install OpenCV/opencv_contrib or use vcpkg, build `calibrator_cli`, and have the user run the three hardware probe commands.
|
||||
|
||||
## 2026-05-24 - Hardware Probe Built And Verified
|
||||
|
||||
Installed local `vcpkg` at `C:\git\vcpkg`, bootstrapped it, and installed `opencv4[contrib]` through the repository manifest. Initial `vcpkg install` selected Visual Studio 18 and failed in `libjpeg-turbo`; forcing Visual Studio 2022 with `VCPKG_VISUAL_STUDIO_PATH` fixed it. Reusable note recorded in `problems/2026-05-24-vcpkg-selects-visual-studio-18-libjpeg-turbo-failure.md`.
|
||||
|
||||
Built `mapping` successfully with `CMakePresets.json`:
|
||||
|
||||
```powershell
|
||||
& "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" --preset vs2022-vcpkg
|
||||
& "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" --build --preset release
|
||||
```
|
||||
|
||||
Verified:
|
||||
|
||||
- `calibrator_cli --help`
|
||||
- `calibrator_cli --list-displays`
|
||||
- `calibrator_cli --list-cameras 10`
|
||||
- `calibrator_cli --capture-camera` for indices `0-7`
|
||||
- `calibrator_cli --probe-hardware out\hardware_probe3 10`, with `report.json` parsed by PowerShell `ConvertFrom-Json`
|
||||
- `calibrator_cli --generate-graycode 128 72 out\smoke_patterns` produced 28 frames
|
||||
- `calibrator_cli --write-stubs out\smoke_exports` produced session JSON, PFM warp, alpha PNG, and beta PNG
|
||||
|
||||
Observed hardware:
|
||||
|
||||
- Active displays: primary `DISPLAY1`, likely projectors `DISPLAY3` at `(1920,0)` and `DISPLAY2` at `(3840,0)`, all `1920x1080@60`.
|
||||
- OpenCV camera indices `4` and `5` showed the real curved screen from two USB camera viewpoints.
|
||||
- Camera indices `0-3` were black; `6-7` were color-bar test streams.
|
||||
|
||||
Pushed `mapping` commit `77a2bc0 Build hardware probe with vcpkg`.
|
||||
|
|
|
|||
|
|
@ -13,19 +13,19 @@ Create a new open-source automatic projection calibration module for Unreal Engi
|
|||
- Initial scaffold commit `371291f864f3186a60ec27086002c929cfc1dabd` was pushed to remote `main`.
|
||||
- Additional reference repositories were captured in `docs/reference_repositories.md`.
|
||||
- Step 01 hardware probe was implemented and pushed in commit `77b1a65`: `--list-cameras`, `--capture-camera`, `--list-displays`, `vcpkg.json`, and `docs/step_01_hardware_probe.md`.
|
||||
- Step 01 was built and verified in commit `77a2bc0`: vcpkg/OpenCV configured, `CMakePresets.json` added, `--probe-hardware` added, GrayCode and stub export smoke checks passed.
|
||||
- The new project should start clean instead of extending the old experimental `ProjectionMapping` tree.
|
||||
- Prior `ProjectionMapping` knowledge remains relevant for pitfalls, especially GrayCode capture, stereo `top/bottom` output assumptions, Kinect/manual alignment, and correspondence diagnostics.
|
||||
- Visual Studio CMake exists at `C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe`, but configure currently fails because OpenCV/opencv_contrib is not installed or `OpenCV_DIR` is not set.
|
||||
- Visual Studio CMake exists at `C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe`.
|
||||
- `C:\git\vcpkg` was installed and bootstrapped locally. `opencv4[contrib]` was installed through manifest mode after forcing VS 2022 with `VCPKG_VISUAL_STUDIO_PATH`.
|
||||
- Current observed displays: `DISPLAY1` primary at `(0,0)`, likely projectors `DISPLAY3` at `(1920,0)` and `DISPLAY2` at `(3840,0)`, all `1920x1080@60`.
|
||||
- Current observed OpenCV camera indices: `0-3` black `1920x1080`, `4-5` real USB cameras showing the curved screen at `640x480`, `6-7` color-bar test streams at `1280x720`.
|
||||
|
||||
## Next Actions
|
||||
|
||||
- Install OpenCV/opencv_contrib or use vcpkg with the repository `vcpkg.json`.
|
||||
- Run CMake with either `OpenCV_DIR` or `CMAKE_TOOLCHAIN_FILE`.
|
||||
- Build `calibrator_cli`.
|
||||
- Verify Step 01:
|
||||
- `calibrator_cli --list-displays`
|
||||
- `calibrator_cli --list-cameras 10`
|
||||
- `calibrator_cli --capture-camera <index> out\camera<index>.png`
|
||||
- Have the user confirm that camera indices `4` and `5` are the intended two USB cameras.
|
||||
- Have the user confirm projector physical order for `DISPLAY3` and `DISPLAY2`.
|
||||
- Run `calibrator_cli --probe-hardware out\hardware_probe 10` when hardware is rechecked.
|
||||
- After hardware probe succeeds, continue toward GrayCode projection window/output selection.
|
||||
- Continue from stubs toward USB camera enumeration and GrayCode capture/decode.
|
||||
- Study the first-priority references before implementing projector-camera decoding and calibration details.
|
||||
|
|
@ -33,6 +33,5 @@ Create a new open-source automatic projection calibration module for Unreal Engi
|
|||
## Blockers
|
||||
|
||||
- Public repository name and remote are not selected.
|
||||
- Dependency management approach is not finalized; `vcpkg.json` was added as the first practical path.
|
||||
- OpenCV/opencv_contrib is missing from the current machine CMake configuration.
|
||||
- Dependency management approach is not finalized; `vcpkg.json` and `CMakePresets.json` are the first practical path.
|
||||
- Exact Unreal nDisplay PFM convention needs verification before final exporter behavior.
|
||||
|
|
|
|||
Reference in a new issue