83 KiB
83 KiB
Mapping Project Status
Goal
Create a new open-source automatic projection calibration module for Unreal Engine nDisplay, producing software-compatible warp and blend outputs for a curved screen with two projectors, two USB cameras, and Kinect 2.0.
Current State
- Project requirements were captured from the user on 2026-05-24.
- Local working directory is expected to be
C:\git\mappping. C:\git\mapppingis now a Git repository on branchmain.- Remote repository was created at
ssh://wuu@192.168.1.66:22/srv/git/mapping.git. - Initial scaffold commit
371291f864f3186a60ec27086002c929cfc1dabdwas pushed to remotemain. - 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, anddocs/step_01_hardware_probe.md. - Step 01 was built and verified in commit
77a2bc0: vcpkg/OpenCV configured,CMakePresets.jsonadded,--probe-hardwareadded, GrayCode and stub export smoke checks passed. - The new project should start clean instead of extending the old experimental
ProjectionMappingtree. - Prior
ProjectionMappingknowledge remains relevant for pitfalls, especially GrayCode capture, stereotop/bottomoutput 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. C:\git\vcpkgwas installed and bootstrapped locally.opencv4[contrib]was installed through manifest mode after forcing VS 2022 withVCPKG_VISUAL_STUDIO_PATH.- Current confirmed display mapping:
- Windows Settings monitor
1/DISPLAY1/ CLI index0: primary monitor at(0,0),1920x1080@60. - Windows Settings monitor
2/DISPLAY3/ CLI index2: left projector at(1920,0),1920x1080@60. - Windows Settings monitor
3/DISPLAY2/ CLI index1: right projector at(3840,0),1920x1080@60.
- Windows Settings monitor
- Current observed OpenCV camera indices:
0-3black1920x1080,4-5confirmed by the user as the intended real USB cameras showing the curved screen at640x480,6-7color-bar test streams at1280x720. - Kinect 2.0 is visible to Windows:
WDF KinectSensor Interface 0,Xbox NUI Sensor,Microphone Array (Xbox NUI Sensor), USBVID_045E&PID_02C4, statusOK. - Microsoft Kinect SDK v2 is installed at
C:\Program Files\Microsoft SDKs\Kinect\v2.0_1409. - OpenCV camera index
10is not Kinect; captured frame showed an OBS-style virtual camera placeholder. - Network snapshot camera support was added in
mappingcommitcc43e5e. The camera is currently reachable at192.168.1.40through an HTTP snapshot endpoint, but credentials and full URL must stay local and must not be committed. - Network snapshot capture was verified at
1920x1080; combined hardware probe with network camera wrote a valid JSON report. - Local secret handling was added in
mappingcommitae48e55:.env.exampleis committed,.env.localis ignored, and local.env.localsnapshot capture was verified. - Step 02 projector output was added in
mappingcommiteeb3122:--project-test-patternand--project-graycode-framecan show fullscreen patterns on a selected Windows display index. - Step 02 smoke test on primary display index
0succeeded for checker and GrayCode frame0. - User verified that
--project-graycode-frame 2 0 10displays a black/white stripe image, as expected for GrayCode frame0. - Step 03 projected pattern capture was added in
mappingcommit7bdb471:--project-and-captureprojects a pattern and captures USB cameras4,5plus optional network snapshot. - Step 03 smoke test on primary display index
0captured USB4, USB5, and network camera, and wrote a validproject_capture_report.json. - Captured projector checks showed both projectors are visible to cameras, but the non-target projector continued showing colored content. Isolated capture mode was added in
mappingcommita08b63cto blank non-target projectors. - Step 04 full GrayCode sequence capture was implemented and locally verified.
--capture-graycode-sequence-isolatedcaptured all 44 OpenCV GrayCode frames while blanking the opposite projector, then wrote per-camera frame folders,graycode_sequence_report.json, and contact sheets. - Verification on 2026-05-24 captured 44/44 frames with 0 failures for
network,usb_4, andusb_5for both projector outputs:- Left projector: Windows monitor
2/DISPLAY3/ CLI display index2at(1920,0), blanking display index1, outputout\graycode_display2_sequence. - Right projector: Windows monitor
3/DISPLAY2/ CLI display index1at(3840,0), blanking display index2, outputout\graycode_display1_sequence.
- Left projector: Windows monitor
- Visual review of contact sheets shows usable vertical/horizontal GrayCode bands. CLI index
2illuminates the left/center screen region; CLI index1illuminates the right screen region. USB camera5sees the screen broadly; USB camera4is useful but more cropped/perspective-dependent. - Windows display names and CLI indices are not stable enough to trust across reboot/cable/GPU changes. Step 05 adds
--verify-projector-layout, which projects centered display identity text plus an ArUco marker, blanks other candidates, captures USB/network cameras, decodes marker IDs from the camera images, and writesprojector_layout_check.jsonplus contact sheets. - Step 05 ArUco verification on 2026-05-25 succeeded with candidates
2,1: current CLI index2is the left projector and current CLI index1is the right projector. The JSON had"expectedMarkerDetected": truefor both candidates. Network snapshot capture appends a cache-busting query parameter to avoid stale images. - Step 06 GrayCode capture from verified layout was implemented and locally verified.
--capture-graycode-sequence-from-layoutreadsprojector_layout_check.json, requiresexpectedMarkerDetected=true, selects the current display byleft,right,candidate:N,marker:N, ordisplay:N, blanks the other candidate projector outputs, and recordslayoutSourcein the GrayCode report. - Step 06 verification on 2026-05-25 captured 44/44 frames with 0 failures for
network,usb_4, andusb_5for bothleftandrightselectors usingout\projector_layout_check_aruco2\projector_layout_check.json. - Step 07 GrayCode decode diagnostics was implemented and locally verified.
--decode-graycode-sequencereads a captured sequence and camera folder, calls OpenCVGrayCodePattern::getProjPixel, writescorrespondences.csv,valid_mask.png,modulation.png,projector_x.png,projector_y.png, anddecode_report.json. - Step 07 verification on 2026-05-25:
- Left layout capture +
usb_5, sample step2, thresholds5/40/80: 33,950 valid correspondences from 76,800 sampled pixels, valid ratio0.442057. - Right layout capture +
usb_4, sample step2, thresholds5/40/80: 28,131 valid correspondences from 76,800 sampled pixels, valid ratio0.366289. - Visual diagnostics show smooth projector X/Y gradients on the screen region. The modulation threshold significantly reduced false points outside the projected screen.
- Left layout capture +
- Step 08 correspondence cleanup was folded into
--decode-graycode-sequence: it now writes raw and cleaned correspondences, dilates the sampled valid mask, keeps the largest connected screen component, and outputs cleanedvalid_mask.png/projector maps. - Step 08 verification on 2026-05-25:
- Left +
usb_5: raw 33,950 -> cleaned 32,859 correspondences; 19 components before cleanup; false side/bottom groups removed visually. - Right +
usb_4: raw 28,131 -> cleaned 28,129 correspondences; 2 components before cleanup; almost no loss because the mask was already clean.
- Left +
- Step 09 first homography estimate was implemented and locally verified.
--estimate-homographyreadscleaned_correspondences.csv, estimates camera-to-projector homography with OpenCV RANSAC, and writes matrix/residual/inlier diagnostics. - Step 09 verification on 2026-05-25:
- Left +
usb_5: 32,859 correspondences, 19,224 inliers, inlier ratio0.585045, mean inlier error1.98597projector pixels. - Right +
usb_4: 28,129 correspondences, 4,720 inliers, inlier ratio0.167798, mean inlier error2.07464projector pixels. - Residual maps show systematic error growth across the screen, especially on the right projector. This indicates curved-screen/non-planar geometry rather than random GrayCode failure; next model should be local grid/piecewise warp, not one global homography.
- Left +
- Step 10 local warp grid diagnostics was implemented and locally verified.
--build-local-warp-gridreadscleaned_correspondences.csv, bins correspondences into camera-space cells, writeslocal_warp_grid.csv, density image, vector visualization, and coverage/displacement statistics. - Step 10 verification on 2026-05-25:
- Left +
usb_5, cell size 24: 269/391 valid cells, valid cell ratio0.68798, 32,859 correspondences, mean normalized displacement0.169048. - Right +
usb_4, cell size 24: 226/460 valid cells, valid cell ratio0.491304, 28,129 correspondences, mean normalized displacement0.249276. - Vector visualizations are smooth and show strong local direction changes, especially on the right, confirming local/piecewise warp is the correct next path.
- Left +
- Step 11 projector coverage mask diagnostics was implemented and locally verified.
--build-projector-coveragerasterizes cleaned correspondences in projector pixel space and writes raw/alpha/preview masks plus coverage statistics. - Step 11 verification on 2026-05-25:
- Left +
usb_5: raw ratio0.0158464, dilated/closed coverage ratio0.956738, bounds(15,0)-(1919,1079). - Right +
usb_4: raw ratio0.0135648, dilated/closed coverage ratio0.959511, bounds(0,0)-(1899,1079). - These masks are diagnostic alpha/coverage masks only; morphology fills most of projector space and still preserves object/shadow holes near the bottom. Do not treat them as final blend/overlap masks.
- Left +
- Step 12 camera-space overlap detection was implemented and locally verified.
--detect-overlapcompares cleaned decode masks from the same camera and rasterizes the overlap back into each projector's pixel space. - Step 12 verification on 2026-05-25 used
usb_5for both projectors:- Right projector was decoded for
usb_5: 10,639 cleaned correspondences, valid ratio0.138529, bounds(0,0)-(675,1079). - Overlap between
out\decode_left_usb5_cleanandout\decode_right_usb5_clean: 3,434 camera overlap pixels, left overlap fraction0.104507, right overlap fraction0.322775. - Projector-space overlap masks covered about
0.116614of the left projector and0.118134of the right projector after morphology. - Visual preview shows overlap in the expected vertical seam/stitch region. The next step should create alpha falloff gradients from this overlap, not just binary masks.
- Right projector was decoded for
- Step 13 first alpha blend masks were implemented and locally verified.
--generate-alpha-blendreads the binary projector-space overlap masks and writes left/right alpha PNG masks plus preview images. - Step 13 verification on 2026-05-25:
- Command:
.\build\Release\calibrator_cli.exe --generate-alpha-blend out\overlap_usb5 out\alpha_usb5 1.0. - Left overlap alpha bounds:
(1686,0)-(1919,1079), 241,811 overlap pixels. - Right overlap alpha bounds:
(0,0)-(233,1079), 244,962 overlap pixels. - Output masks are
1920x1080, 8-bit, range0-255. - Visual previews show the expected projector-space seam: left projector fades down at its right edge; right projector fades up at its left edge. This is still a diagnostic linear/gamma falloff, not final photometric compensation.
- Command:
- Step 14 first PFM warp prototype was implemented and locally verified.
--generate-pfm-warp-prototypereads cleaned GrayCode correspondences and writes a diagnostic projector-space PFM lookup with channels[camera_u, camera_v, valid]. - Step 14 verification on 2026-05-25:
- Left command:
.\build\Release\calibrator_cli.exe --generate-pfm-warp-prototype out\decode_left_usb5_clean out\pfm_left_usb5 3 9. - Right command:
.\build\Release\calibrator_cli.exe --generate-pfm-warp-prototype out\decode_right_usb4_clean out\pfm_right_usb4 3 9. - Both outputs are
PFPFM files,1920x1080, little-endian scale-1.0, size24,883,218bytes. - Left: 32,859 accepted samples, sparse ratio
0.0158464, coverage ratio0.956738, valid pixels1,983,892. - Right: 28,129 accepted samples, sparse ratio
0.0135648, coverage ratio0.959511, valid pixels1,989,641. - Preview images show smooth projector-space lookup gradients with black holes matching previous coverage/shadow holes. This is not final nDisplay 3D warp geometry; it is a diagnostic lookup scaffold until depth/screen geometry is integrated.
- Left command:
- Network overview camera IP was changed from
192.168.1.64to192.168.1.40on 2026-05-25. Local.env.localwas updated without committing credentials, and snapshot capture viaenv:MAPPING_NETWORK_CAMERA_URLwas verified at1920x1080. - Step 15 Kinect v2 probe was implemented and locally verified.
--probe-kinect2uses Microsoft Kinect SDK v2 directly and saves color, depth, and infrared diagnostics. - Step 15 verification on 2026-05-25:
- Command:
.\build\Release\calibrator_cli.exe --probe-kinect2 out\kinect_probe. - Kinect SDK v2 was found at
C:\Program Files\Microsoft SDKs\Kinect\v2.0_1409; CMake linksKinect20.libwhen present. - Sensor open HRESULT
0x0;availableInitial=false,availableAfterCapture=true,streamsCaptured=true. - Color captured:
1920x1080, mean136.348, stddev58.0319. - Depth captured:
512x424, reliable range500-4500 mm, valid pixels185,567, depth range1022-4500 mm. - Infrared captured:
512x424, preview mean26.4273, stddev11.0233. - Visual checks show RGB view of the curved screen, a usable depth heatmap of the curved surface, and an IR image. Next geometry step should map Kinect depth into color/camera/projector coordinates.
- Command:
- Step 16 Kinect v2 point cloud export was implemented and locally verified.
--export-kinect2-point-cloudcaptures depth/color, uses Kinect SDK v2ICoordinateMapperto convert depth pixels into camera-space XYZ meters, maps color where available, and writes ASCII PLY. - Step 16 verification on 2026-05-25:
- Command:
.\build\Release\calibrator_cli.exe --export-kinect2-point-cloud out\kinect_point_cloud 1 4500. - Depth input:
512x424, sampled pixels217,088, stride1. - Point cloud:
185,431points,171,218colored points. - Bounds in Kinect camera space: min
(-3.22499, -2.55469, 0.631), max(2.38352, 2.28927, 4.475)meters. - Outputs include
kinect_point_cloud.ply, front/top preview PNGs, raw depth, depth preview, and color frame. - Visual front preview shows the scene/screen; top preview clearly shows the curved screen arc. Next step should segment the screen surface from the raw scene point cloud.
- Command:
- Step 17 Kinect screen segmentation was implemented and locally verified.
--segment-kinect-screenreads the Kinect PLY point cloud, applies adjustable Kinect camera-space bounds, and writes a screen-only PLY plus front/top previews. - Step 17 verification on 2026-05-25:
- Command:
.\build\Release\calibrator_cli.exe --segment-kinect-screen out\kinect_point_cloud out\kinect_screen_segment. - Default bounds after tuning:
x=-2.25..2.15,y=-0.55..0.25,z=1.25..3.45meters. - Source point cloud:
185,431points. - Screen segment:
40,169points, kept ratio0.216625. - Segment bounds: min
(-2.24926, -0.549997, 2.665), max(1.93202, 0.246633, 3.449)meters. screen_top_preview.pngshows a clean curved screen arc with most floor/stand/background clutter removed. This is still a bounds-based segment; later fitting should reject residual outliers.
- Command:
- Step 18 Kinect RGB camera integration was implemented and locally verified. Kinect v2 color can now be used as an additional camera source named
kinect_colorin capture/layout/GrayCode workflows. - Step 18 verification on 2026-05-25:
- Single capture:
.\build\Release\calibrator_cli.exe --capture-kinect2-color out\kinect_color_check\color.pngproduced1920x1080, mean138.472, stddev58.2602. --probe-hardware out\hardware_probe_kinect_color 5now writes akinectColorsection andkinect_color.png; verified1920x1080, mean142.226, stddev58.4572.- Capture pipeline accepts
+kinectin camera CSV arguments, e.g.4,5,+kinect, and writes the camera askinect_color. --project-and-capture 0 checker out\project_capture_primary_kinect_color 1 4,5,+kinectcaptured USB4, USB5, andkinect_color.- Important nuance: Kinect SDK RGB frames were mirrored for calibration use.
kinect_colorcapture outputs are now flipped horizontally before saving, while raw SDK color used for depth/color mapping remains unchanged. - Layout verification with
--verify-projector-layout 2,1 out\projector_layout_check_kinect_color_flip2 2 4,5,+kinectsucceeded: Kinect RGB decoded marker10for left/display index2and marker11for right/display index1. - GrayCode smoke:
--capture-graycode-sequence-from-layout ... left out\graycode_left_kinect_color_smoke2 +kinectcaptured44/44Kinect RGB frames after increasing first-frame warmup. - Kinect RGB decode:
--decode-graycode-sequence out\graycode_left_kinect_color_smoke2 kinect_color out\decode_left_kinect_color_smoke2 4 5 40 80produced21,396cleaned correspondences from129,600sampled pixels, valid ratio0.165093, full projector bounds(0,0)-(1919,1079), and smooth projector X/Y diagnostics.
- Single capture:
- Step 19 network camera default pipeline participation was implemented and locally verified. If an explicit network URL is not passed, the CLI now tries
MAPPING_NETWORK_CAMERA_URLfrom the process environment, then local ignored.env.local. The full URL/credentials are not written to reports. - Step 19 verification on 2026-05-25:
- Layout command without explicit network URL:
.\build\Release\calibrator_cli.exe --verify-projector-layout 2,1 out\projector_layout_check_network_default 2 4,5,+kinect. - The command automatically included
networkfrom local.env.local, alongsideusb_4,usb_5, andkinect_color. - Layout report contact cameras:
kinect_color,network,usb_4,usb_5. - Network camera decoded marker
10for left/display index2and marker11for right/display index1. - GrayCode command without explicit network URL:
.\build\Release\calibrator_cli.exe --capture-graycode-sequence-from-layout out\projector_layout_check_network_default\projector_layout_check.json left out\graycode_left_network_default_smoke +kinect. - The command captured
44/44frames fornetworkand44/44forkinect_color. - Network decode command:
.\build\Release\calibrator_cli.exe --decode-graycode-sequence out\graycode_left_network_default_smoke network out\decode_left_network_default_smoke 4 5 40 80. - Network decode produced
23,259cleaned correspondences from129,600sampled pixels, valid ratio0.179468, projector bounds(12,0)-(1919,1079), and smooth projector X diagnostics. - Passing
noneas the optional network argument disables network capture for a specific run.
- Layout command without explicit network URL:
- Step 20 Kinect RGB decode to Kinect depth 3D bridge was implemented and locally verified.
--map-kinect-color-decode-to-3dreadskinect_colorGrayCodecleaned_correspondences.csv, captures a fresh Kinect depth frame, maps depth pixels through Kinect SDKICoordinateMapperinto raw color coordinates and camera-space XYZ, converts saved de-mirroredkinect_colorX back into SDK color X, and writes projector-pixel-to-3D samples. - Step 20 verification on 2026-05-25:
- Command:
.\build\Release\calibrator_cli.exe --map-kinect-color-decode-to-3d out\decode_left_kinect_color_smoke2 out\projector_3d_left_kinect 4 4500. - Input correspondences:
21,396. - Matched 3D correspondences:
18,706, match ratio0.874276. - Mean color/depth lookup search distance:
0.036274 px. - Kinect camera-space bounds: min
(0.0954764, -1.16996, 2.674), max(1.96908, 0.173243, 3.54)meters. - Outputs include
projector_3d_correspondences.csv,projector_3d_points.ply,projector_3d_top_preview.png,projector_3d_front_preview.png,projector_3d_color_preview.png,depth_preview.png, andprojector_3d_report.json. - Visual previews show a curved screen arc/topology and a dense projector-covered region; right-edge extra/background points remain and should be rejected by the next screen-surface filtering/fitting step.
- Command:
- Full calibration session
out\full_calibration_20260525_0335was captured and verified on 2026-05-25 with all current sources: USB4, USB5,kinect_color, and defaultnetwork.- Layout: candidate/display
2/DISPLAY3confirmed as left projector; candidate/display1/DISPLAY2confirmed as right projector. Kinect RGB and network decoded markers for both projectors; USB5decoded left marker and USB4decoded right marker. - GrayCode capture: left and right each captured
44/44frames forusb_4,usb_5,network, andkinect_color. - Main USB decodes: left
usb_5kept32,835samples, valid ratio0.427539; rightusb_4kept28,014samples, valid ratio0.364766. - Kinect RGB decodes: left
18,987samples, valid ratio0.146505; right17,946samples, valid ratio0.138472. - Network decodes: left
23,226samples, valid ratio0.179213; right13,435samples, valid ratio0.103665. - Kinect 3D bridge: left matched
16,624/18,987samples, match ratio0.875546; right matched17,946/17,946, match ratio1.0. - Fresh Kinect screen segment:
40,216/184,736points kept, ratio0.217694. - Overlap from USB
5pair: camera overlap pixels3,572, left mask fraction0.108786, right mask fraction0.358491; projector overlap ratios about0.116and0.118. - PFM prototypes: left accepted
32,835samples, coverage ratio0.955885; right accepted28,014samples, coverage ratio0.957506.
- Layout: candidate/display
- Step 21 projector 3D filtering against the Kinect screen segment was implemented and locally verified.
--filter-projector-3d-by-screen-segmentkeeps projector-to-3D samples within a configurable nearest-neighbor distance of the segmented screen point cloud. - Step 21 verification on 2026-05-25 using session
out\full_calibration_20260525_0335:- Left: kept
9,999/16,624samples, keep ratio0.60148, mean nearest screen distance0.00908242 m, bounds(0.0955957, -0.627791, 2.631)to(1.93318, 0.17359, 3.429). - Right: kept
10,995/17,946samples, keep ratio0.612671, mean nearest screen distance0.00787641 m, bounds(-1.72209, -0.628243, 2.773)to(0.367285, 0.18398, 3.435). - Top previews show clean left/right portions of the same curved screen arc after filtering. This is ready for a first smooth surface fitting step.
- Left: kept
- Step 22 first smooth screen surface fit was implemented and locally verified.
--fit-screen-surfacecombines filtered left/right projector-to-3D samples with the Kinect screen segment, fits a vertical cylindrical arc in Kinect camera-space X/Z, runs a robust second pass, and writes a PLY mesh plus residual diagnostics. - Step 22 verification on 2026-05-25 using session
out\full_calibration_20260525_0335:- Command:
.\build\Release\calibrator_cli.exe --fit-screen-surface out\full_calibration_20260525_0335\filtered_projector_3d_left_kinect out\full_calibration_20260525_0335\filtered_projector_3d_right_kinect out\full_calibration_20260525_0335\kinect_screen_segment out\full_calibration_20260525_0335\screen_surface_fit 128 40. - Model:
vertical_cylindrical_arc_xz. - Inputs: left
9,999, right10,995, screen segment40,216, total61,210; robust fit inliers61,171. - Circle fit in X/Z: center
(0.011876, 0.416237), radius2.95867 m. - Mesh:
128 x 40,5,120vertices,9,906faces. - RMS residuals: left
0.0286836 m, right0.0303674 m, screen0.0362382 m, all0.0341005 m. - Outputs include
screen_surface_mesh.ply,screen_surface_top_preview.png,screen_surface_front_preview.png,surface_fit_samples.csv, andscreen_surface_report.json.
- Command:
- Step 23 surface-based projector warp mesh diagnostics were implemented and locally verified.
--build-surface-warp-meshreads filtered projector-to-3D samples and the fitted cylindrical screen surface, interpolates a regular projector-space grid, projects vertices back onto the screen surface, and writes a mesh carrying both 3D XYZ and projector UV/pixel attributes. - Step 23 verification on 2026-05-25 using session
out\full_calibration_20260525_0335:- Left command:
.\build\Release\calibrator_cli.exe --build-surface-warp-mesh out\full_calibration_20260525_0335\filtered_projector_3d_left_kinect out\full_calibration_20260525_0335\screen_surface_fit out\full_calibration_20260525_0335\surface_warp_left_kinect 96 54 180. - Left result: input samples
9,999, grid96 x 54, valid vertices5,184/5,184, mean nearest projector distance5.22542 px, max nearest distance49.4364 px, observed projector boundsx=223..1919,y=0..698. - Right command:
.\build\Release\calibrator_cli.exe --build-surface-warp-mesh out\full_calibration_20260525_0335\filtered_projector_3d_right_kinect out\full_calibration_20260525_0335\screen_surface_fit out\full_calibration_20260525_0335\surface_warp_right_kinect 96 54 180. - Right result: input samples
10,995, grid96 x 54, valid vertices5,184/5,184, mean nearest projector distance7.42829 px, max nearest distance110.136 px, observed projector boundsx=2..1895,y=0..709. - Outputs include
surface_warp_mesh.ply,surface_warp_vertices.csv, projector/top/front previews, andsurface_warp_mesh_report.json. - Important limitation: meshes currently cover observed Kinect-filtered active regions, not the full
1920x1080projector frame. Before final nDisplay export, decide whether to extrapolate to full frame or export observed active region with masks.
- Left command:
- Step 24 hybrid full-frame surface warp export was implemented and locally verified.
--export-hybrid-surface-warpexports a full-frame projector PFM while trusting only observed surface-warp pixels; outside observed region the PFM is zeroed and alpha mask is zero. - Step 24 verification on 2026-05-25 using session
out\full_calibration_20260525_0335:- Left command:
.\build\Release\calibrator_cli.exe --export-hybrid-surface-warp out\full_calibration_20260525_0335\surface_warp_left_kinect out\full_calibration_20260525_0335\hybrid_surface_warp_left 1920 1080. - Left result: full-frame
1920x1080, observed bounds(223,0)-(1919,698), active pixels1,186,203, active ratio0.57205, alpha nonzero pixels1,186,203, beta nonzero pixels0. - Right command:
.\build\Release\calibrator_cli.exe --export-hybrid-surface-warp out\full_calibration_20260525_0335\surface_warp_right_kinect out\full_calibration_20260525_0335\hybrid_surface_warp_right 1920 1080. - Right result: full-frame
1920x1080, observed bounds(2,0)-(1895,709), active pixels1,344,740, active ratio0.648505, alpha nonzero pixels1,344,740, beta nonzero pixels0. - Outputs include
surface_warp_full_frame_xyz.pfm,surface_warp_alpha_mask.png,surface_warp_beta_mask.png,surface_warp_full_frame_preview.png, andhybrid_surface_warp_report.json. - Current PFM channels are metric Kinect camera-space
x_m,y_m,z_m; exact Unreal nDisplay PFM convention still needs verification before final naming/semantics are considered stable.
- Left command:
- Step 25 visual projection checks were added:
--project-blend-check <left_display_index> <right_display_index> [seconds]shows a raw unwarped grid/circle table on both projectors.--project-hybrid-surface-check <left_display_index> <right_display_index> <left_hybrid_dir> <right_hybrid_dir> [seconds] [alpha_blend_dir]generates the check image from the hybrid surface PFM/alpha data and optionally applies alpha blend masks.- Current session command:
.\build\Release\calibrator_cli.exe --project-hybrid-surface-check 2 1 out\full_calibration_20260525_0335\hybrid_surface_warp_left out\full_calibration_20260525_0335\hybrid_surface_warp_right 120 out\full_calibration_20260525_0335\alpha_usb5.
- After visual review, the raw projection showed no calculated warp/blend, and the first hybrid surface preview showed only the observed region with visibly wavy lines. Step 23 was updated to smooth projector-to-surface mapping with a degree-3 polynomial from projector coordinates to cylindrical surface coordinates instead of nearest-neighbor/IDW XYZ interpolation.
- Smoothed verification outputs:
- Left smooth mesh:
out\full_calibration_20260525_0335\surface_warp_left_smooth, theta RMS0.000894156, Y RMS0.00267861 m. - Right smooth mesh:
out\full_calibration_20260525_0335\surface_warp_right_smooth, theta RMS0.000923297, Y RMS0.00285035 m. - Smoothed hybrid exports:
hybrid_surface_warp_left_smoothandhybrid_surface_warp_right_smooth. - Geometry-only visual command:
.\build\Release\calibrator_cli.exe --project-hybrid-surface-check 2 1 out\full_calibration_20260525_0335\hybrid_surface_warp_left_smooth out\full_calibration_20260525_0335\hybrid_surface_warp_right_smooth 120.
- Left smooth mesh:
- Step 26 surface-coordinate alpha blend was implemented and live-verified on the projectors/cameras.
--generate-surface-alpha-blend <left_hybrid_dir> <right_hybrid_dir> <output_dir> [gamma]computes overlap in fitted cylindrical surface theta, writesleft_alpha.png,right_alpha.png, preview images, andsurface_alpha_blend_report.json. - Step 26 verification on 2026-05-25:
- Command:
.\build\Release\calibrator_cli.exe --generate-surface-alpha-blend out\full_calibration_20260525_0335\hybrid_surface_warp_left_smooth out\full_calibration_20260525_0335\hybrid_surface_warp_right_smooth out\full_calibration_20260525_0335\surface_alpha_smooth 1.0. - Overlap theta range:
1.45166..1.54312. - Left theta range/mean:
0.86594..1.54312, mean1.20594; right theta range/mean:1.45166..2.20525, mean1.82387. - Live projection command:
.\build\Release\calibrator_cli.exe --project-hybrid-surface-check 2 1 out\full_calibration_20260525_0335\hybrid_surface_warp_left_smooth out\full_calibration_20260525_0335\hybrid_surface_warp_right_smooth 120 out\full_calibration_20260525_0335\surface_alpha_smooth. - Camera probe output:
out\surface_alpha_smooth_probe. Network and USB camera images show much smoother grid lines and surface-aware brightness fade, but remaining seam misregistration around the center overlap. Next correction should be seam-local geometry/projector-registration refinement, not just alpha direction.
- Command:
- Step 27 full-frame extrapolated surface diagnostic was implemented after visual review showed blank left/bottom areas. The blank areas were caused by the observed-region alpha policy, not projector output failure: previous hybrid exports filled only observed bounds such as left
x=223..1919,y=0..698. - Step 27 changes:
--build-surface-warp-meshnow accepts optional[projector_width projector_height]and can build the smooth polynomial surface grid over the full projector frame while still reporting which vertices are observed/trusted.--export-hybrid-surface-warpnow accepts optional[observed|full].observedpreserves the old trusted-mask behavior.fullwritesalpha=255across the full projector frame using the extrapolated polynomial surface model and also writessurface_warp_observed_alpha_mask.pngas diagnostics for trusted pixels.
- Step 27 verification on 2026-05-25:
- Left full smooth mesh:
out\full_calibration_20260525_0335\surface_warp_left_full_smooth, grid128x72, valid/trusted vertices7007/9216. - Right full smooth mesh:
out\full_calibration_20260525_0335\surface_warp_right_full_smooth, grid128x72, valid/trusted vertices7082/9216. - Full hybrid exports: left/right active pixels
2073600/2073600; observed/trusted pixels left1568597, right1585189. - Full alpha blend:
out\full_calibration_20260525_0335\surface_alpha_full_smooth, overlap theta1.448..1.54312. - Live projection command:
.\build\Release\calibrator_cli.exe --project-hybrid-surface-check 2 1 out\full_calibration_20260525_0335\hybrid_surface_warp_left_full_smooth out\full_calibration_20260525_0335\hybrid_surface_warp_right_full_smooth 120 out\full_calibration_20260525_0335\surface_alpha_full_smooth. - Camera probe output:
out\surface_full_smooth_probe. Network and USB images confirm the check image now reaches the left edge and bottom. Remaining issue is seam/local geometry accuracy, not missing coverage.
- Left full smooth mesh:
- Step 28 oriented cylinder screen coordinates were implemented after visual review showed the first problem is warp curvature: horizontal check lines were not parallel to the physical screen bend. The old surface model assumed the cylinder axis was exactly Kinect camera
Y; the new model estimates a screen-local cylinder frame with PCA and storesscreenFrame.origin,axis,radialU, andradialV. - Step 28 verification on 2026-05-25:
- Oriented fit:
out\full_calibration_20260525_0335\screen_surface_fit_oriented, modeloriented_cylindrical_arc_pca_axis. - Estimated screen axis:
[-0.0214249, 0.962567, -0.270194], showing a significant tilt relative to KinectY. - Oriented full meshes:
surface_warp_left_oriented_full_smoothandsurface_warp_right_oriented_full_smooth, both128x72; trusted vertices left7007/9216, right7082/9216. - Oriented exports:
hybrid_surface_warp_left_oriented_full_smooth,hybrid_surface_warp_right_oriented_full_smooth. - Oriented alpha:
surface_alpha_oriented_full_smooth, overlap theta1.55912..1.65569. - Live projection command:
.\build\Release\calibrator_cli.exe --project-hybrid-surface-check 2 1 out\full_calibration_20260525_0335\hybrid_surface_warp_left_oriented_full_smooth out\full_calibration_20260525_0335\hybrid_surface_warp_right_oriented_full_smooth 120 out\full_calibration_20260525_0335\surface_alpha_oriented_full_smooth. - Camera probe output:
out\surface_oriented_full_probe. Review shows horizontal lines now follow the screen-local cylinder coordinate better than the Kinect-Y model, but local warp/seam errors remain. Next work should refine projector-to-surface mapping using camera-observed line/feature alignment, not blend tuning.
- Oriented fit:
- A follow-up boundary-linear normalization experiment was attempted for the right-side vertical-line skew and rejected. Output
out\surface_boundary_full_probeshowed a severe wrong lower duplicate/warped region. The temporary code was reverted and not committed. Do not reuse simple linear boundary normalization as-is; fix right-edge skew through camera-observed local warp optimization. - Step 29 dense marker-grid projection was implemented to support display identity, screen-boundary detection, and future camera-observed local warp correction.
- Commands:
--generate-marker-grid <display_index> <output_dir> [columns] [rows]--project-marker-grid <display_index> [seconds] [columns] [rows]--detect-marker-grid <image_path> <output_dir>
- Uses OpenCV ArUco
DICT_5X5_1000. Default tested grid is20x11markers. Each display gets a unique id block derived from CLI display index; current left display2generated ids440..659, right display1generated ids220..439. - Offline self-detection after removing decorative text labels: left/right generated PNGs detect
220/220markers. - Live left-projector test command:
.\build\Release\calibrator_cli.exe --project-marker-grid 2 120 20 11, camera probeout\marker_grid_left_live_probe. - Live detections from left projector: network camera
73markers, USBcamera461markers, USBcamera5178markers. This is enough to start estimating visible marker boundary/coverage and a local correction field, while network-camera readability may need a larger-marker mode.
- Commands:
- Step 30 dense marker parameters were added for boundary/photo workflows.
--generate-marker-gridand--project-marker-gridnow accept optional[marker_scale] [white_margin_scale]; manifest CSV includes exact marker bounding boxes as well as cell bounds.- Default marker scale is now
0.54, white margin scale0.06. - Dense-photo test:
24x13, marker scale0.50, white margin0.04, generated312markers per projector with no gaps between color cells. - Offline self-detection for dense PNGs:
312/312for left and right. - Live left-projector dense test on current cameras: network
5, USBcamera413, USBcamera532. This is too dense for the current camera positions/resolution, but remains useful for high-resolution camera/photo import or after adding more USB cameras. Keep20x11as current reliable live default.
- Default marker scale is now
- Step 31 monochrome marker-grid mode was implemented and is now the default. Color cell backgrounds are removed unless
coloris explicitly passed; this greatly improves live detection.- Commands now accept final optional
[mono|color]. - Tested mono dense command:
.\build\Release\calibrator_cli.exe --project-marker-grid 2 120 24 13 0.72 0.03 mono. - Offline mono dense PNG detection: left/right
312/312. - Live mono dense left-projector detection on current cameras: network
180, USBcamera491, USBcamera5249. This is a major improvement over color dense (5/13/32) and should be the recommended dense boundary mode. - Note: during the live test, the other projector still showed an older/color pattern in the network view. For final capture, blank the other projector or project unique marker grids on both projectors in a synchronized command.
- Commands now accept final optional
- Step 32 OAK-D PoE diagnostics were added after the user connected an OAK-D PoE at
192.168.1.100.- Python
depthaiis installed and verified as version3.6.1. - Network check to
192.168.1.100:11490succeeds. - Device reports as
OAK-D-POE, mxid/device id184430102127401300. - Connected cameras:
CAM_AIMX378 color4056x3040;CAM_BandCAM_COV9282 mono/color1280x800. tools/oakd_poe_probe.pywas added as a repeatable Python diagnostic until the C++depthai-coredependency is selected.- Stable split commands:
py tools\oakd_poe_probe.py --ip 192.168.1.100 --output out\oakd_poe_probe --skip-depth --reconnect-delay 4py tools\oakd_poe_probe.py --ip 192.168.1.100 --output out\oakd_poe_probe_depth --only-depth --skip-eeprom --reconnect-delay 4
- Outputs include OAK-D EEPROM calibration JSON, RGB/mono frames, rectified stereo frames, raw depth, depth preview, and JSON frame reports.
- Current OAK-D view is not aimed at the projection screen: RGB/mono see the room/desk area, while depth works with about
33,078valid depth pixels and mean depth about3004 mm. Reposition OAK-D toward the curved screen before using it for marker/GrayCode calibration.
- Python
- Step 33 OAK-D PoE recalibration research was documented. The current device EEPROM says
boardName=DM2088,boardRev=R0M0E0,productName=OAK-D PoE AF, which maps todepthai-boardsboard configOAK-D-POE.json. Before mapping use, recalibrate with a flat ChArUco board via Luxonis manual calibration tooling, backup existing EEPROM first, and validate reprojection/depth before flashing. - OAK-D PoE monitor-based ChArUco capture was completed in
out\oakd_recalibration_20260525_205548: 8 RGB, 8 left mono, 8 right mono frames. Processing produced good stereo metrics: left reprojection0.2167 px, right reprojection0.1968 px, left/right epipolar0.1136 px. RGB reprojection was higher at2.628 px; use this result as a good stereo-depth candidate, but consider a better second pass before relying on RGB-aligned depth or flashing EEPROM. - OAK-D manual ChArUco preview/capture tooling was added after Luxonis UI capture proved unreliable. Use
tools\show_image_borderless.pyfor a borderless 1920x1080 target andtools\oakd_charuco_manual_capture.pyfor live RGB/left/right preview. The capture tool uses RGBispfull-FOV instead of croppedvideo.- Best current manual result:
out\oakd_manual_preview_20260525_223541, 7 full RGB/left/right triplets. - Metrics: RGB reprojection
0.3542 px, left0.4067 px, right0.5296 px, left/right epipolar0.3870 px, right/RGB epipolar0.9393 px. - This improves RGB dramatically; stereo is acceptable but not as strong as the first monitor capture. Prefer one more 8-12 pose manual run before EEPROM flashing.
- Best current manual result:
- OAK-D second manual ChArUco pass was completed in
out\oakd_manual_preview_20260525_230655with 16 complete RGB/left/right triplets.- Metrics: RGB reprojection
0.5599 px, left0.5681 px, right0.4712 px, left/right epipolar0.1917 px, right/RGB epipolar1.2532 px. - This is the best balanced candidate so far because it has more pose diversity and improved stereo epipolar versus the seven-pose manual run, while keeping RGB reprojection far better than the original Luxonis monitor run.
- OAK-D capture tools now leave RGB and mono exposure on auto by default. Manual exposure is only used when
--rgb-exposure-usor--mono-exposure-usis explicitly set above zero.
- Metrics: RGB reprojection
- OAK-D EEPROM was flashed with the 16-pose candidate.
- Backup before flash:
out\oakd_poe_before_eeprom_flash_20260525_230655\oakd_calibration_eeprom.json. - Flashed candidate/readback:
out\oakd_manual_preview_20260525_230655\oakd_eeprom_candidate_flashed.jsonandoakd_eeprom_after_flash.json. - Device readback succeeded, EEPROM version is
7, and readback intrinsics match the 16-pose candidate. - Post-flash RGB/mono probe:
out\oakd_poe_after_eeprom_flash_20260525_230655. - Post-flash depth probe:
out\oakd_poe_after_eeprom_flash_depth_20260525_230655; depth pipeline starts, but the immediate probe had only1471valid pixels, so re-aim/recheck OAK-D before using its depth in mapping.
- Backup before flash:
- Hardware probe after adding two USB cameras and OAK-D was verified in
out\hardware_probe_after_oakd.- Displays remain active as primary index
0, right projector index1/DISPLAY2, left projector index2/DISPLAY3. - USB
camera4andcamera5remain useful screen views. - New USB
camera6andcamera7are useful additional screen views. camera8andcamera9appear to be duplicate virtual/test streams and should not be used for calibration until proven otherwise.- Kinect color and the network camera are still captured by
--probe-hardware.
- Displays remain active as primary index
- Tight no-gap marker-grid defaults were updated but should still preserve the ArUco white quiet zone internally. Offline verification with
24x13 1.0 0.04 monodetected312/312generated markers. - Fast one-second GrayCode capture was added and verified.
- Add optional
frame_hold_msto--capture-graycode-sequence-isolatedand--capture-graycode-sequence-from-layout. - Use
1000to hold each GrayCode frame for about one second. - Fast mode keeps USB cameras open and drains their frame buffers during the hold interval to avoid stale frames.
- Verified outputs:
out\fast_graycode_1s_test_left_freshusbandout\fast_graycode_1s_test_right_freshusb, all44/44frames forusb_4,usb_5,usb_6,usb_7,network, andkinect_color. - Current best USB decode coverage: left projector
usb_6thenusb_5; right projectorusb_7thenusb_4. Kinect color remains stable full-frame; network is useful overview QA.
- Add optional
- Full fast calibration pass was run in
out\calibration_20260526_0000.- Current layout: left projector
CLI 1 / DISPLAY2, right projectorCLI 2 / DISPLAY3. - Main GrayCode captures:
graycode_leftandgraycode_right, all44/44forusb_4,usb_5,usb_6,usb_7,network, andkinect_color. - Separate OAK-D captures:
graycode_left_oakdandgraycode_right_oakd, all44/44foroakd_rgb,oakd_left, andoakd_right. - OAK-D decode worked after making
parseGrayCodeSequenceInfoaccept pretty-printed JSON display objects. - Fresh Kinect surface pipeline produced
hybrid_surface_warp_left_full,hybrid_surface_warp_right_full, andsurface_alpha_full. - Visual check capture:
out\calibration_20260526_0000\surface_check_probe\surface_check_contact.png. - Current result is a usable full-frame surface-warp candidate, but local seam/geometry alignment still needs camera-observed marker-grid correction before final nDisplay export.
- Current layout: left projector
- First camera-observed boundary/local correction test was run.
- Marker-grid captures:
out\calibration_20260526_0000\marker_grid_probe. - Marker detections were strong: network
480, Kinect495, USB4274, USB5228, USB6292, USB7311. - Added
tools\generate_camera_observed_check.pyandtools\show_two_images_borderless.py. - Dense network-camera corrected projector images:
out\calibration_20260526_0000\camera_observed_correction_network_dense. - Captured result:
out\calibration_20260526_0000\camera_observed_correction_dense_probe\camera_observed_dense_contact.png. - This improves line alignment in the network-camera view, proving the correction path, but it is still a single-camera correction; multi-camera fusion is needed before treating it as final warp.
- Marker-grid captures:
- 4-second unified USB/OAK-D GrayCode capture was run in
out\calibration_20260526_4s_oak_unified.- Added
tools\capture_graycode_with_oakd.py. - Left and right passes captured
44/44forusb_4,usb_5,usb_6,usb_7,oakd_rgb,oakd_left, andoakd_right. - Best decode sources remain left
usb_6and rightusb_7; OAK-D mono streams decode, but OAK-D RGB was weaker on the left. - Generated a USB-driven correction with left
usb_6and rightusb_7:out\calibration_20260526_4s_oak_unified\camera_observed_usb6_usb7_probe\camera_observed_usb6_usb7_contact.png. - OAK-D marker-grid boundary check found
0markers onoakd_rgb,oakd_left, andoakd_right, so OAK-D should not yet drive boundary/local correction. It can participate in GrayCode/decode diagnostics.
- Added
- Regularized multi-camera correction tooling was added.
- New tool:
tools\generate_regularized_multicamera_check.py. - It can use
--reference-detected-csvto put multiple USB camera detections into one reference UV frame. - It now fits an affine baseline plus a clamped residual correction with outlier rejection and residual weighting to avoid local waves.
- Bad reference-UV cubic result:
out\calibration_20260526_4s_oak_unified\regularized_multicamera_reference_uv_probe\regularized_multicamera_reference_uv_contact.png. - Smoother diagnostic result:
out\calibration_20260526_4s_oak_unified\regularized_multicamera_low_wave_probe\regularized_multicamera_low_wave_contact.png. - Ultra-smooth diagnostic result:
out\calibration_20260526_4s_oak_unified\regularized_multicamera_ultra_smooth_probe\regularized_multicamera_ultra_smooth_contact.png. - Current conclusion: smoothing reduces waves, but the calibration is still not correct and projector overlap is not final. The next step must use one shared marker-ID/surface coordinate solve and explicit seam constraints, not just independent camera-to-reference homographies.
- New tool:
- Marker-ID polynomial UV and marker-sampled projector fit were tested.
tools\generate_regularized_multicamera_check.pynow supports--camera-uv-model polyand--sample-mode markers.- Dense polynomial marker-id UV output:
out\calibration_20260526_4s_oak_unified\regularized_multicamera_marker_poly_probe\regularized_multicamera_marker_poly_contact.png. - Marker-sampled projector output:
out\calibration_20260526_4s_oak_unified\regularized_multicamera_marker_sampled_probe\regularized_multicamera_marker_sampled_contact.png. - Marker UV RMS improved to about
0.014-0.018 UV, and dense inlier projector fit RMS improved to about0.0158 UVleft /0.0099 UVright, but visual calibration is still not acceptable. - Conclusion remains: the next production solve must bind marker observations to the Kinect/OAK/depth-backed surface coordinate system and add explicit overlap seam constraints.
- OAK-D PoE calibration camera mode changed to RGB 4K only.
tools\oakd_graycode_capture.py,tools\capture_graycode_with_oakd.py, andtools\oakd_live_preview.pynow use onlyoakd_rgb_4k.- OAK mono streams
oakd_leftandoakd_rightare removed from the main calibration capture path. - Default OAK RGB size is
3840x2160via DepthAI API, default5 fps. - Verified one-frame capture from
192.168.1.100:out\oakd_rgb_4k_probe\oakd_rgb_4k_isp.png, frame shape(2160, 3840, 3). - Use
color.ispfor the 4K stream;color.videoproduced a valid frame but logged a DepthAI crash dump on shutdown.
- OAK is now temporarily excluded from active calibration.
tools\capture_graycode_with_oakd.pyno longer opens OAK/DepthAI by default.- OAK can only be included with explicit
--enable-oakd. tools\oakd_graycode_capture.pyno longer imports DepthAI unless OAK-specific code is used.- Active next calibration sources are USB cameras, network camera, and Kinect; OAK should not be used in layout verification, GrayCode capture, marker correction, or surface correction for now.
- USB camera capture resolution was fixed.
- Cause:
UsbCamerapreviously opened DirectShow cameras without requesting a mode, so they defaulted to640x480. libs\camera\src\UsbCamera.cppnow tries MJPG modes in order:1920x1080@30,1280x720@30,640x480@30.- Verification output:
out\step_calibration_20260526\step02a_usb_resolution_probe\usb_resolution_contact.png. - Current confirmed USB modes:
camera4:1920x1080camera5:1920x1080camera6:1280x720camera7:1280x720
- The step 2 left GrayCode capture was recorded before this fix and should be redone before decoding or continuing the calibration.
- Cause:
- USB camera aiming preview was added.
- Script:
tools\usb_quad_preview.py. - Launcher:
tools\run_usb_quad_preview.ps1. - Desktop shortcut:
C:\Users\post\Desktop\USB Cameras Preview.lnk. - Shows USB cameras
4,5,6,7in one 2x2 live window and labels actual frame resolution. - Preview tiles use letterboxing so the full camera frame is visible without crop.
- Script:
- USB system-resolution diagnostics were added.
- Script:
tools\usb_resolution_probe.py. - Latest check:
out\usb_resolution_probe_system_check\usb_resolution_probe.json. - Accepted DirectShow modes:
camera4:1920x1080 via 1080p_mjpgcamera5:1920x1080 via 1080p_mjpgcamera6:1280x720 via 720p_mjpgcamera7:1280x720 via 720p_mjpg
- Windows does not provide a reliable global forced UVC resolution for all apps; mapping tools must request the preferred mode when opening cameras.
- Script:
- High-res step-by-step GrayCode decode is current.
- Left capture:
out\step_calibration_20260526\step02_graycode_left_highres. - Right capture:
out\step_calibration_20260526\step03_graycode_right_highres. - Decode summary image:
out\step_calibration_20260526\step04_decode_summary_contact.png. - Best current decode sources:
- left:
step04_decode_left_usb_5,step04_decode_left_network,step04_decode_left_kinect_color, withstep04_decode_left_usb_6as extra wide/overlap context. - right:
step04_decode_right_usb_4,step04_decode_right_usb_7,step04_decode_right_network,step04_decode_right_kinect_color.
- left:
- Left capture:
- Denser high-res decode candidate was generated.
- Parameters:
sample_step=2,white=5,black=30,modulation=70. - Summary image:
out\step_calibration_20260526\step04b_decode_s2_m70_summary_contact.png. - Valid points increased about
4xover thesample_step=4decode while ratios stayed stable. - Candidate decode dirs use suffix
_s2_m70, for examplestep04b_decode_left_usb_5_s2_m70andstep04b_decode_right_usb_7_s2_m70.
- Parameters:
- Locked-control GrayCode capture was added and tested.
UsbCameracan now readMAPPING_USB_CAMERA_PRESETand apply per-camera fixedautoExposure=false,exposure,gain,autoWhiteBalance=false, andwhiteBalancevalues after opening the DirectShow camera.- New helper:
tools\calibrate_usb_camera_controls.pysweeps USB exposure/gain/WB while projecting black/gray/white frames and writes ausb_camera_preset.json. - Conservative tested preset:
out\step_calibration_20260526\step05_usb_camera_controls_conservative_preset.json. - CLI GrayCode capture now saves
reference_blackandreference_whiteframes before GrayCode frames for every active source: USB cameras, network camera, and Kinect color. - Kinect v2 color camera settings in the Microsoft Kinect SDK are read-only for this path (
ExposureTime,Gain,Gamma), so manual fixed exposure/WB cannot currently be forced. The practical stabilization is keeping the Kinect color reader open during the sequence and recording black/white reference frames. - Network camera exposure/WB is not controlled through the snapshot URL yet; it is included in the same black/white reference frame capture and decode path.
- Locked-control 4-second GrayCode retest was captured and decoded.
- Left capture:
out\step_calibration_20260526\step06_graycode_left_locked_controls. - Right capture:
out\step_calibration_20260526\step07_graycode_right_locked_controls. - Decode settings:
sample_step=2,white=5,black=30,modulation=70. - Summary image:
out\step_calibration_20260526\step08_decode_locked_s2_m70_summary_contact.png. - Reference frame contact:
out\step_calibration_20260526\step08_reference_frames_contact.png. - Decode summary JSON:
out\step_calibration_20260526\step08_decode_locked_s2_m70_summary.json. - Left valid points:
usb_4:93265/518400, ratio0.1799, bounds(459,0)-(1919,1079).usb_5:95736/518400, ratio0.1847, bounds(3,0)-(1919,1079).usb_6:23184/230400, ratio0.1006, bounds(68,0)-(1919,1079).usb_7:33428/230400, ratio0.1451, bounds(924,0)-(1919,1079).kinect_color:292690/518400, ratio0.5646, bounds(0,0)-(1919,1079).network:91110/518400, ratio0.1758, bounds(5,0)-(1919,1079).
- Right valid points:
usb_4:123614/518400, ratio0.2385, bounds(0,0)-(1866,1079).usb_5:74989/518400, ratio0.1447, bounds(0,0)-(829,1079).usb_6:15886/230400, ratio0.0689, bounds(0,0)-(687,1079).usb_7:33057/230400, ratio0.1435, bounds(0,0)-(1865,1079).kinect_color:279650/518400, ratio0.5394, bounds(0,0)-(1919,1079).network:57354/518400, ratio0.1106, bounds(0,0)-(1862,1079).
- Interpretation: Kinect color became the strongest 2D decode source after the locked-control/reference-frame retest. USB/network are still useful for independent views and seam/edge validation, but the next geometry solve must treat Kinect color as a major observation source and bridge it to Kinect depth/surface.
- Left capture:
- Bright-room 2-second GrayCode retest was captured and decoded without Kinect saturation filtering.
- USB bright-room preset:
out\step_calibration_20260526\step09_usb_camera_controls_bright_room_preset.json. - Left capture:
out\step_calibration_20260526\step10_graycode_left_bright_2s. - Right capture:
out\step_calibration_20260526\step11_graycode_right_bright_2s. - Decode settings:
sample_step=2,white=5,black=30,modulation=70. - Summary image:
out\step_calibration_20260526\step12_decode_bright_2s_s2_m70_summary_contact.png. - Summary JSON:
out\step_calibration_20260526\step12_decode_bright_2s_s2_m70_summary.json. - Left valid points:
usb_4:87245/518400, ratio0.1683.usb_5:71931/518400, ratio0.1388.usb_6:51640/230400, ratio0.2241.usb_7:58103/230400, ratio0.2522.kinect_color:76218/518400, ratio0.1470.network:99650/518400, ratio0.1922.
- Right valid points:
usb_4:109439/518400, ratio0.2111.usb_5:64171/518400, ratio0.1238.usb_6:29709/230400, ratio0.1289.usb_7:56080/230400, ratio0.2434.kinect_color:75705/518400, ratio0.1460.network:82298/518400, ratio0.1588.
- Interpretation: under room lights and 2-second frame hold, Kinect color no longer produces the very high raw valid count seen in the darker/4-second run. The stronger practical sources are now network,
usb_4, and especiallyusb_6/usb_7relative to their 720p sample counts.
- USB bright-room preset:
- Threshold sweep was run on the bright-room 2-second GrayCode captures.
- Sweep outputs:
out\step_calibration_20260526\step13_threshold_sweep_bright_2sandout\step_calibration_20260526\step13_threshold_sweep_bright_2s_extra. - Summary:
out\step_calibration_20260526\step13_threshold_sweep_bright_2s_selected_summary.json. - Previous threshold
white=5 black=30 modulation=70:862189/5068800, ratio17.01%. - Safe increased threshold
white=10 black=30 modulation=40:1141541/5068800, ratio22.52%. - Balanced recommended threshold
white=15 black=30 modulation=40:1262403/5068800, ratio24.91%. - Maximum-count threshold
white=20 black=30 modulation=30:1342832/5068800, ratio26.49%. blackthreshold had no meaningful effect in tested ranges20..50;whiteandmodulationdrove the count changes.- Recommendation: use
white=15 black=30 modulation=40for the next production decode. Usewhite=20 black=30 modulation=30only as an aggressive diagnostic because its component count is much higher and may admit noise.
- Sweep outputs:
- Safe threshold
sample_step=1decode was tested on the bright-room 2-second GrayCode captures.- Settings:
sample_step=1,white=10,black=30,modulation=40. - Summary image:
out\step_calibration_20260526\step14_decode_bright_2s_s1_safe_summary_contact.png. - Summary JSON:
out\step_calibration_20260526\step14_decode_bright_2s_s1_safe_summary.json. - Total:
4566442/20275200, ratio22.52%. - Compared to
sample_step=2with the same safe thresholds (1141541/5068800, ratio22.52%), the valid point count increases about4xwhile the ratio stays effectively unchanged. - Interpretation:
sample_step=1is a denser version of the same mask and should be useful for final fitting if CSV size/performance is acceptable.
- Settings:
- Kinect color decode was mapped to live Kinect 3D using the safe
sample_step=1bright-room decode.- Command inputs:
- left decode:
out\step_calibration_20260526\step14_decode_left_kinect_color_bright_2s_s1_safe. - right decode:
out\step_calibration_20260526\step14_decode_right_kinect_color_bright_2s_s1_safe.
- left decode:
- Outputs:
- left:
out\step_calibration_20260526\step15_projector_3d_left_kinect_s1_safe. - right:
out\step_calibration_20260526\step15_projector_3d_right_kinect_s1_safe. - contact sheet:
out\step_calibration_20260526\step15_projector_3d_kinect_s1_safe_contact.png.
- left:
- Settings:
search_radius_px=4,max_depth_mm=4500. - Left result:
317464/327224matched, ratio0.9702, boundsX -0.069..2.172,Y -1.318..0.185,Z 2.729..3.906meters. - Right result:
306031/306031matched, ratio1.0, boundsX -1.846..0.234,Y -1.361..0.185,Z 2.687..4.018meters. - Interpretation: the 2D-to-3D bridge worked well for both projectors. The next step should filter these 3D projector samples against a screen-only Kinect segment before fitting the smooth surface.
- Command inputs:
- Fresh Kinect point cloud, screen segment, and filtered projector 3D samples were generated.
- Kinect point cloud:
out\step_calibration_20260526\step16_kinect_point_cloud.- Points:
190155, colored:175159, stride1, max depth4500 mm.
- Points:
- Screen segment:
out\step_calibration_20260526\step17_kinect_screen_segment.- Bounds used:
minX=-2.25 maxX=2.15 minY=-0.55 maxY=0.25 minZ=1.25 maxZ=3.45. - Screen points:
41467/190155, ratio0.2181. - Screen bounds:
X -2.136..1.960,Y -0.550..0.247,Z 2.573..3.449meters.
- Bounds used:
- Filtered left projector 3D:
out\step_calibration_20260526\step18_filtered_projector_3d_left_kinect_s1_safe.- Threshold:
0.08 m. - Kept:
203109/317464, ratio0.6398, mean nearest screen distance0.00849 m. - Bounds:
X -0.069..1.966,Y -0.628..0.185,Z 2.729..3.463meters.
- Threshold:
- Filtered right projector 3D:
out\step_calibration_20260526\step18_filtered_projector_3d_right_kinect_s1_safe.- Threshold:
0.08 m. - Kept:
187311/306031, ratio0.6121, mean nearest screen distance0.00784 m. - Bounds:
X -1.835..0.221,Y -0.629..0.185,Z 2.687..3.462meters.
- Threshold:
- Contact sheet:
out\step_calibration_20260526\step18_kinect_screen_filter_contact.png. - Interpretation: filtering looks numerically healthy and preserved a very dense set of screen-near samples. Next step is fitting the smooth screen surface from filtered left/right samples plus the screen segment.
- Kinect point cloud:
- Smooth screen surface was fitted from filtered projector 3D samples plus the Kinect screen segment.
- Output:
out\step_calibration_20260526\step19_screen_surface_fit_s1_safe. - Contact sheet:
out\step_calibration_20260526\step19_screen_surface_fit_s1_safe_contact.png. - Model:
oriented_cylindrical_arc_pca_axis. - Input counts: left
203109, right187311, screen41467, total431887. - Robust inliers:
431606. - Circle/cylinder: center
(0.0395, -2.7403), radius2.9791 m, branch sign1. - Residual RMS:
- left
0.0484 m. - right
0.0447 m. - screen
0.0472 m. - all
0.0467 m.
- left
- Mesh:
128 x 40,5120vertices,9906faces. - Interpretation: this is good enough to proceed to a prototype surface warp mesh, but not final precision. The 4-5 cm RMS suggests Kinect depth noise, segmentation thickness, screen cloth/edge clutter, and/or a too-simple cylindrical model still affect geometry. Expect visual check to require smoothing/regularization and possibly tighter screen segmentation.
- Output:
- Surface warp meshes, hybrid full-frame exports, and alpha blend masks were generated from the safe
sample_step=1dataset.- Left surface warp mesh:
out\step_calibration_20260526\step20_surface_warp_left_s1_safe.- Grid
96 x 54, valid vertices5184/5184, observed projector bounds(83,0)-(1919,686). - Mean nearest projector distance
1.73 px, max47.04 px.
- Grid
- Right surface warp mesh:
out\step_calibration_20260526\step20_surface_warp_right_s1_safe.- Grid
96 x 54, valid vertices5184/5184, observed projector bounds(0,0)-(1919,703). - Mean nearest projector distance
6.01 px, max138.85 px.
- Grid
- Left hybrid export:
out\step_calibration_20260526\step21_hybrid_surface_warp_left_s1_safe.- Full frame
1920x1080, active pixels1262019, active ratio0.6086.
- Full frame
- Right hybrid export:
out\step_calibration_20260526\step21_hybrid_surface_warp_right_s1_safe.- Full frame
1920x1080, active pixels1351680, active ratio0.6519.
- Full frame
- Alpha blend:
out\step_calibration_20260526\step22_alpha_blend_s1_safe.- Gamma
2.2, overlap theta(1.52111, 1.61416). - Nonzero blend pixels: left
1253092, right1348764.
- Gamma
- Contact sheet:
out\step_calibration_20260526\step22_surface_warp_hybrid_blend_contact.png. - Next step: project
--project-hybrid-surface-check 1 2 ...or equivalent using current left/right display indices, then capture/check visually before treating this as useful warp.
- Left surface warp mesh:
- Hybrid surface check was projected and captured with cameras.
- Projection command used left display index
1, right display index2, left/right hybrid dirs from step21, and alpha blend dir from step22. - Capture output:
out\step_calibration_20260526\step23_hybrid_surface_check_projection. - Contact sheet:
out\step_calibration_20260526\step23_hybrid_surface_check_projection\step23_hybrid_surface_check_contact.png. - Captured sources:
usb_4,usb_5,usb_6,usb_7,network,kinect_color. - Visual observation: the pattern is readable and the surface-space grid is projected, but the lower part of the physical screen remains blank because the hybrid exports are in
observedmode with trusted projector Y bounds only to about686left and703right. This is expected from the current full-frame-container + observed-region-truth policy, not a capture failure. - Next options: either continue evaluating observed-region warp quality, or generate a diagnostic
fullhybrid export/extrapolated check if the user wants to fill the whole projector frame visually.
- Projection command used left display index
- Diagnostic full/no-mask hybrid surface check was generated and captured.
- Full exports:
- left:
out\step_calibration_20260526\step24_hybrid_surface_warp_left_s1_safe_full. - right:
out\step_calibration_20260526\step24_hybrid_surface_warp_right_s1_safe_full. - Both are
1920x1080,activeRatio=1.0, modefull.
- left:
- Projection capture:
out\step_calibration_20260526\step25_hybrid_surface_check_full_nomask_projection. - Contact sheet:
out\step_calibration_20260526\step25_hybrid_surface_check_full_nomask_projection\step25_hybrid_surface_check_full_nomask_contact.png. - Observation: the lower screen area is now filled, confirming that the previous blank lower area was caused by observed-region masking/trust bounds. However, the full extrapolated area shows clear artifacts/rectangular patches in the lower region, so it is diagnostic only and should not be treated as a reliable final warp.
- Full exports:
- Root cause of the missing lower screen area was found and corrected in a new diagnostic path.
- The
kinect_colordecode and 2D-to-3D bridge already had full projector Y coverage (0..1079). - The old screen segment used
minY=-0.55 m, while lower projector pixels map to Kinect camera-space Y down to about-1.25 mleft and-1.16 mright. - Therefore
--filter-projector-3d-by-screen-segmentremoved all lower projector samples, shrinking observed projector bounds to aboutY <= 686..703. - New screen segment:
out\step_calibration_20260526\step26b_kinect_screen_segment_tall_zscreen.- Bounds used:
X -2.25..2.15,Y -1.35..0.25,Z 2.50..3.65. - Screen points:
75132/190155, ratio0.3951.
- Bounds used:
- New filtered projector samples:
- left:
out\step_calibration_20260526\step27b_filtered_projector_3d_left_kinect_tall_zscreen_s1_safe, kept316788/317464, ratio0.9979. - right:
out\step_calibration_20260526\step27b_filtered_projector_3d_right_kinect_tall_zscreen_s1_safe, kept305883/306031, ratio0.9995.
- left:
- New surface fit:
out\step_calibration_20260526\step28_screen_surface_fit_tall_zscreen_s1_safe.- Residual RMS: all
0.0301 m, left0.0230 m, right0.0191 m, screen0.0686 m.
- Residual RMS: all
- New surface meshes:
- left:
out\step_calibration_20260526\step29_surface_warp_left_tall_zscreen_s1_safe, mean nearest projector distance3.29 px. - right:
out\step_calibration_20260526\step29_surface_warp_right_tall_zscreen_s1_safe, mean nearest projector distance2.80 px.
- left:
- New hybrid observed exports:
- left:
out\step_calibration_20260526\step30_hybrid_surface_warp_left_tall_zscreen_s1_safe, active ratio0.9911, observed bounds(17,0)-(1919,1079). - right:
out\step_calibration_20260526\step30_hybrid_surface_warp_right_tall_zscreen_s1_safe, active ratio1.0, observed bounds(0,0)-(1919,1079).
- left:
- New alpha blend:
out\step_calibration_20260526\step31_alpha_blend_tall_zscreen_s1_safe. - New projection capture:
out\step_calibration_20260526\step32_hybrid_surface_check_tall_zscreen_projection\step32_hybrid_surface_check_tall_zscreen_contact.png. - Observation: the lower screen is now filled in observed/masked mode, confirming the fix. The check still needs geometric/seam quality evaluation before continuing to final warp/blend.
- The
- Boundary-aware surface check pattern diagnostic was added.
- Code change:
--project-hybrid-surface-checknow computes local top/bottom axis curves from active PFM samples across surface theta bins and normalizes verticalvbetween those curves for the check pattern. - This affects the visual diagnostic grid only; it does not yet change the exported warp mesh geometry.
- Captured output:
out\step_calibration_20260526\step34_boundary_aware_surface_check_projection\step34_boundary_aware_surface_check_contact.png. - Live projection output:
out\step_calibration_20260526\step35_live_boundary_aware_surface_check. - Observation: the diagnostic helps separate vertical-coordinate parameterization from projector warp, but camera captures suggest it is not a complete fix for horizontal-line alignment. A stronger next step is to detect/fit actual screen top/bottom edges from camera/marker observations and use those boundary curves in the surface UV solver, not only in the check pattern.
- Code change:
- Boundary-aware diagnostic was rejected by the user and reverted.
- User observation: it became worse, top projection no longer covered the full area and horizontal lines were still not parallel to screen borders.
- Mapping repo revert commit:
dcd8a6c. - Current live projection output after revert:
out\step_calibration_20260526\step36_live_reverted_surface_check. - Current interpretation: do not use the PFM-derived boundary-aware check as the path forward. The next investigation should focus on real screen edge detection / marker-grid boundary constraints and on the surface/UV solve itself.
- Upright Kinect-Y surface frame diagnostic was added and tested.
- Code change:
--build-surface-warp-meshaccepts optional final mode argumentuprightafter full-frame width/height. In this mode the same XZ cylinder is used, but surface vertical coordinate is Kinect/worldY, not the fitted PCA screen axis. - Mapping commit for the mode: pending/current local branch at the time of this note.
- Outputs:
- left mesh:
out\step_calibration_20260526\step37_surface_warp_left_upright_s1_safe. - right mesh:
out\step_calibration_20260526\step37_surface_warp_right_upright_s1_safe. - left hybrid:
out\step_calibration_20260526\step38_hybrid_surface_warp_left_upright_s1_safe. - right hybrid:
out\step_calibration_20260526\step38_hybrid_surface_warp_right_upright_s1_safe. - alpha blend:
out\step_calibration_20260526\step39_alpha_blend_upright_s1_safe. - captured check:
out\step_calibration_20260526\step40_upright_surface_check_projection\step40_upright_surface_check_contact.png. - live projection:
out\step_calibration_20260526\step41_live_upright_surface_check.
- left mesh:
- Results: left mesh mean nearest projector distance
4.03 px, right2.80 px, both full1920x1080observed exports. - Observation: captured views look very similar to the reverted/oriented variant; no strong improvement in horizontal-line alignment. Therefore the tilted PCA axis is not the only/main cause. The next useful fix should add real screen edge/marker boundary constraints to the surface/projector solve.
- Code change:
- Upright Kinect-Y diagnostic was rejected by the user and reverted.
- User observation: upright variant became worse.
- Mapping repo revert commit:
4407c57. - Current live projection after revert:
out\step_calibration_20260526\step42_live_reverted_after_upright_check. - Current stable diagnostic output remains the tall-zscreen oriented variant:
- left hybrid
out\step_calibration_20260526\step30_hybrid_surface_warp_left_tall_zscreen_s1_safe. - right hybrid
out\step_calibration_20260526\step30_hybrid_surface_warp_right_tall_zscreen_s1_safe. - blend
out\step_calibration_20260526\step31_alpha_blend_tall_zscreen_s1_safe.
- left hybrid
- Interpretation: both quick vertical-coordinate experiments failed. Do not continue with surface-frame hacks. Next direction should be observation-driven boundary/edge constraints from cameras or marker grids.
- Raw marker-grid boundary observation test was started.
- Dense
24 x 14grid was too dense for reliable detection after projection/camera capture:- capture:
out\step_calibration_20260526\step44_marker_grid_boundary_capture. - most cameras detected
0..1markers only.
- capture:
- Coarser
12 x 7grid worked:- left generated grid:
out\step_calibration_20260526\step45_marker_grid_left_raw_12x7, IDs84..167. - right generated grid:
out\step_calibration_20260526\step45_marker_grid_right_raw_12x7, IDs168..251. - capture/detection:
out\step_calibration_20260526\step46_marker_grid_boundary_capture_12x7. - contact sheet:
out\step_calibration_20260526\step46_marker_grid_boundary_capture_12x7\step46_marker_grid_detection_contact.png. - summary JSON:
out\step_calibration_20260526\step46_marker_grid_boundary_capture_12x7\marker_boundary_detection_summary.json.
- left generated grid:
- Detection counts:
usb_4: total91, left36, right55.usb_5: total69, left54, right15.usb_6: total69, left58, right11.usb_7: total71, left17, right54.network: total121, left59, right62.kinect_color: total121, left58, right63.
- Top/bottom row observations are usable, especially from
networkandkinect_color. Extreme side columns are weak or absent, so the first boundary-constraint implementation should focus on top/bottom curves before left/right side constraints.
- Dense
- Marker grid detections were converted into projector/camera observation files.
- Output:
out\step_calibration_20260526\step48_marker_boundary_observations_12x7. - Report:
marker_boundary_observations_report.json. - Joined observations:
marker_projector_camera_observations.csv. - Boundary row candidates:
boundary_row_candidates.csv. - Projector-space consensus points:
boundary_consensus_projector_points.csv. - Contact sheet:
marker_boundary_observation_contact.png. - Total joined observations:
542. - Interpretation: this provides a useful link between marker IDs, projector cell positions, and camera detections. However, it is still marker-center/row visibility data, not direct physical screen edge detection. For robust top/bottom edge constraints, the next capture should use a dedicated border/edge pattern or marker grid with explicit edge lines so cameras can estimate the actual screen boundary, not just which marker rows are readable.
- Output:
- A marker grid with explicit colored border lines was tested.
- Pattern output:
out\step_calibration_20260526\step49_marker_border_pattern_12x7. - Capture/detection:
out\step_calibration_20260526\step50_marker_border_capture_12x7. - Contact sheet:
out\step_calibration_20260526\step50_marker_border_capture_12x7\step50_marker_border_detection_contact.png. - Summary JSON:
out\step_calibration_20260526\step50_marker_border_capture_12x7\marker_border_detection_summary.json. - Detection counts:
usb_4: total76, left30, right46.usb_5: total60, left45, right15.usb_6: total55, left47, right8.usb_7: total61, left16, right45.network: total91, left45, right46.kinect_color: total91, left45, right46.
- Interpretation: the colored border is visually useful, but it reduces marker detection versus the plain
12 x 7grid, especially on top/bottom rows and extreme columns. Use two separate observations for the boundary solve:- plain marker grid for marker ID to projector/camera correspondences;
- clean border-only or edge-line pattern for physical screen top/bottom/side extraction.
- Pattern output:
- A clean border-only diagnostic frame was tested after the marker+border frame.
- Pattern output:
out\step_calibration_20260526\step51_clean_border_pattern. - Manual capture:
out\step_calibration_20260526\step52_clean_border_capture_manual. - Contact sheet:
out\step_calibration_20260526\step52_clean_border_capture_manual\step52_clean_border_contact.png. - Overlay contact:
out\step_calibration_20260526\step52_clean_border_capture_manual\step52_clean_border_overlay_contact.png. - Summary JSON:
out\step_calibration_20260526\step52_clean_border_capture_manual\clean_border_capture_summary.json. - Capture resolutions:
usb_4,usb_5,network,kinect_color:1920x1080.usb_6,usb_7:1280x720.
- Operational note:
--probe-hardwarehung after USB captures during this step, likely while entering Kinect/network capture; the successful capture was done with explicit per-camera commands. - Interpretation: the clean frame is better for human inspection and line extraction than the marker+border frame. The first automatic edge extraction attempt used a global brightness/saturation mask and was too coarse because background walls/metal also enter the mask. The next implementation should segment known projected colors/guide lines within a screen ROI or use marker observations to crop the camera image before fitting top/bottom physical boundary curves.
- Pattern output:
- ROI-constrained border-line extraction was tested.
- Output:
out\step_calibration_20260526\step53_roi_border_line_extraction. - Contact sheet:
out\step_calibration_20260526\step53_roi_border_line_extraction\step53_roi_border_line_contact.png. - Summary JSON:
out\step_calibration_20260526\step53_roi_border_line_extraction\roi_border_line_summary.json. - Method: use marker detections from
step46_marker_grid_boundary_capture_12x7to crop each camera image, then run color/brightness line detection on the clean border-only capture fromstep52_clean_border_capture_manual. - Result: ROI cropping removes most background false positives.
networkandkinect_colorprovide the strongest full-screen line observations; USB cameras are useful as local checks but have narrower/partial views. - Interpretation: this validates the two-frame approach. The next correction should use marker-grid detections to define camera ROIs, extract top/bottom guide curves from clean border captures, compare those curves to the physical screen border in the same ROI, and then generate a smooth boundary correction for the warp.
- Output:
- A first boundary-normalized check projection was generated and tested.
- Pattern output:
out\step_calibration_20260526\step54_boundary_normalized_check. - Captured projection:
out\step_calibration_20260526\step55_boundary_normalized_check_projection. - Contact sheet:
out\step_calibration_20260526\step55_boundary_normalized_check_projection\step55_boundary_normalized_check_contact.png. - Live display output:
out\step_calibration_20260526\step56_live_boundary_normalized_check. - Method: use
networkandkinect_colormarker ROIs plus top/bottom line fits fromstep53to build a projector check image with camera-space vertical normalization between fitted boundary curves. The generated images are diagnostic only; they do not replace the current stable PFM/hybrid warp. - Result: captured images do not show a clear improvement. The pattern is usable for visual comparison, but the seam and line alignment still look problematic, so this first boundary-normalized fit should not be promoted to the final warp.
- Interpretation: the boundary solver needs a better target: fit real physical top/bottom screen edges separately from projected guide lines, then solve a smooth correction constrained by marker correspondences and overlap continuity.
- Pattern output:
- The boundary-normalized diagnostic was rejected and the live display was returned to the stable tall-zscreen surface check.
- Stopped experimental live projection:
out\step_calibration_20260526\step56_live_boundary_normalized_check. - Restarted stable projection:
out\step_calibration_20260526\step57_live_reverted_to_stable_tall_zscreen. - Stable inputs remain:
- left hybrid
out\step_calibration_20260526\step30_hybrid_surface_warp_left_tall_zscreen_s1_safe. - right hybrid
out\step_calibration_20260526\step30_hybrid_surface_warp_right_tall_zscreen_s1_safe. - blend
out\step_calibration_20260526\step31_alpha_blend_tall_zscreen_s1_safe.
- left hybrid
- No code or PFM files were changed by the boundary-normalized diagnostic; it was only an alternative check-image projection.
- Current conclusion: do not continue with heuristic check-image normalizations. The next useful work is analysis/design around a real screen model and independent boundary/surface constraints.
- Stopped experimental live projection:
- A fresh step-by-step recalibration was restarted at the user's request.
- Root:
out\recalibration_20260526_step_by_step. - Step 00 hardware state:
step00_hardware_state.- Displays:
DISPLAY1index0primary,DISPLAY2index1,DISPLAY3index2. - Cameras captured:
usb_4/usb_5at1920x1080,usb_6/usb_7at1280x720,networkat1920x1080,kinect_colorat1920x1080.
- Displays:
- Step 01 projector layout:
step01_projector_layout.DISPLAY2/ CLI index1/ marker10: left projector.DISPLAY3/ CLI index2/ marker11: right projector.
- Step 02 GrayCode capture:
- left:
step02_graycode_left, all active cameras captured44/44. - right:
step02_graycode_right, all active cameras captured44/44.
- left:
- Step 03 GrayCode decode with
sample_step=1,white=5,black=30,modulation=70.- Summary:
out\recalibration_20260526_step_by_step\step03_decode_summary.json. - Contact:
out\recalibration_20260526_step_by_step\step03_decode_contact.png. - Left valid pixels:
network 402012,kinect_color 313356,usb_4 322192,usb_5 261609,usb_6 126259,usb_7 136002. - Right valid pixels:
network 382138,kinect_color 370118,usb_4 456496,usb_5 271155,usb_6 67782,usb_7 266384. - Current camera recommendation for the next step: use
networkas overview QA,kinect_colorfor the 2D-to-3D bridge, and local USB viewsusb_4/usb_5on the left andusb_4/usb_7on the right. Treat rightusb_6as weak/non-primary.
- Summary:
- Root:
Next Actions
- Run
--verify-projector-layoutafter Windows reboot, projector reconnect, cable changes, or GPU driver changes before GrayCode capture, then use--capture-graycode-sequence-from-layoutinstead of hard-coded projector indices. - Continue from the PFM lookup prototype toward a real screen-geometry warp: integrate Kinect/depth or fitted screen surface, verify Unreal nDisplay PFM coordinate convention, and then export final warp geometry.
- Prioritize warp correctness before further blend work: refine projector-to-surface mapping so horizontal check lines follow the physical screen bend and overlap features align in camera views.
- Replace independent camera-observed local correction with a shared marker-ID/surface solve: match detected marker ids to
marker_grid_manifest.csv, attach USB/network/Kinect/OAK observations to one screen coordinate system, and explicitly constrain the projector overlap seam before fitting the warp field. - Keep OAK completely out of the active calibration path until the user explicitly asks to re-enable it.
- Continue blend work only after geometry is acceptable: seam-local geometry correction, coverage-aware refinement, and later brightness/black-level compensation.
- Verify Unreal nDisplay PFM semantics against documentation or an Unreal test project. If nDisplay expects a different coordinate basis or normalized warp fields, add an explicit converter from the current metric
x_m,y_m,z_mPFM. - Treat
networkas a normal additional calibration camera whenever local.env.localorMAPPING_NETWORK_CAMERA_URLis available; decode it with camera namenetwork. - Keep projector order as currently observed unless the user physically reports otherwise:
- Windows monitor
2/DISPLAY2/ CLI index1: left projector. - Windows monitor
3/DISPLAY3/ CLI index2: right projector.
- Windows monitor
- Run
calibrator_cli --probe-hardware out\hardware_probe 10 env:MAPPING_NETWORK_CAMERA_URLwhen hardware is rechecked. - Continue from sequence capture toward GrayCode decode, correspondence filtering, and projector-as-inverse-camera calibration.
- Study the first-priority references before implementing projector-camera decoding and calibration details.
Blockers
- Public repository name and remote are not selected.
- Dependency management approach is not finalized;
vcpkg.jsonandCMakePresets.jsonare the first practical path. - Exact Unreal nDisplay PFM convention needs verification before final exporter behavior.