Skip to content

Cherry Pick PR #15155: Rename MinZ to Improved Close Range Depth - #15158

Merged
Nir-Az merged 1 commit into
realsenseai:r/2.58.2from
Nir-Az:cherry-rename-2582
Jun 4, 2026
Merged

Nir-Az merged 1 commit into
realsenseai:r/2.58.2from
Nir-Az:cherry-rename-2582

Conversation

@Nir-Az

@Nir-Az Nir-Az commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

Overview: Cherry-picks the MinZ → Improved Close Range Depth rename (#15155) onto the r/2.58.2 release branch so the release carries the official feature name.

Tracked on [RSDSO-21589]

Cherry-pick of #15155 (commit 2e1226249).

Summary

  • Viewer post-processing toggle "Min-Z Improvement" → "Improved Close Range Depth" + both unavailable-tooltips
  • CMake flag BUILD_WITH_MINZ → BUILD_WITH_CLOSE_RANGE_DEPTH (option, compile definition, MINZ_* configure vars → CLOSE_RANGE_DEPTH_*)
  • Classes minz_filter/min_z_depth_improver → close_range_depth_filter/close_range_depth_improver; files renamed via git mv
  • Docs: examples/enhanced-depth-range/README.md, examples/readme.md, .github/skills/build.md

External artifact names unchanged: librealsense2-enhanced-depth deb, librs_depth_range.so, /opt paths, readme-media GIF URL.

Conflicts resolved

  • examples/enhanced-depth-range/range_depth.py: kept this branch's N = 640 * 480 resolution (development uses 1280×720); applied only the MinZ → Min-Z string rename.

Test plan

  • Windows build of realsense-viewer (flag OFF, default config) — clean
  • git grep -i minz — only intentional leftovers (external GIF URL, labview physical min-Z)
  • CI green on this PR

@Nir-Az Nir-Az left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review by rs-agentic bot 🤖

Overall this cherry-pick is clean — the rename is systematic and the conflict resolution in range_depth.py is well-documented. A few items flagged below.

if( ! _handle )
{
LOG_WARNING( "MinZ: dlopen(librs_depth_range.so) failed: " << ::dlerror() );
LOG_WARNING( "Close Range Depth: dlopen(librs_depth_range.so) failed: " << ::dlerror() );

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 [rs-agentic bot] BUG / Inconsistency — The log prefix here says "Close Range Depth:" but the feature's official name (and what close-range-depth-improver.cpp uses at line 77 in its own LOG_WARNING) is "Improved Close Range Depth". Inconsistent prefixes make grepping the log for this feature unreliable.

Suggested fix:

LOG_WARNING( "Improved Close Range Depth: dlopen(librs_depth_range.so) failed: " << ::dlerror() );

if( ! _create || ! _destroy || ! _process || ! _last_error )
{
LOG_WARNING( "MinZ: missing symbols in librs_depth_range.so: " << ::dlerror() );
LOG_WARNING( "Close Range Depth: missing symbols in librs_depth_range.so: " << ::dlerror() );

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 [rs-agentic bot] BUG / Inconsistency — Same prefix mismatch as line 37 above: "Close Range Depth:" should be "Improved Close Range Depth:" to stay consistent with the official feature name used everywhere else (UI toggle, CMake status message, close-range-depth-improver.cpp LOG_WARNING).

Suggested fix:

LOG_WARNING( "Improved Close Range Depth: missing symbols in librs_depth_range.so: " << ::dlerror() );


std::printf("\rframe %5lld | close-range: HW %5.2f%% -> improved %5.2f%% "
"| MinZ recovered %5.1f%% | +%6d px",
"| recovered %5.1f%% | +%6d px",

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 [rs-agentic bot] Enhancement — The previous label "MinZ recovered" carried context about what was recovered. The replacement "recovered" is ambiguous when reading headless output in isolation — recovered what? Consider a more descriptive label such as:

"| close-range recovered %5.1f%% | +%6d px",

This is a minor UX point but matters for users interpreting the stats printout.

f"\rframe {f.get_frame_number():>5} │ close-range: "
f"HW {hw_pct:5.2f}% → improved {imp_pct:5.2f}% "
f"│ MinZ recovered {recovery_pct:5.1f}% │ +{rescued:>6} px"
f"│ recovered {recovery_pct:5.1f}% │ +{rescued:>6} px"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 [rs-agentic bot] Enhancement — Same as range_depth.cpp line 115: "recovered" alone is ambiguous. The Python and C++ examples should also stay in sync:

f"│ close-range recovered {recovery_pct:5.1f}% │ +{rescued:>6} px"

@@ -46,7 +46,7 @@
improver = DepthRangeImprover(calib)
T = improver.min_z_threshold_mm
N = 640 * 480

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 [rs-agentic bot] Note (conflict resolution tracking) — N = 640 * 480 was intentionally kept from the r/2.58.2 branch per the PR description (the development branch uses 1280×720). The decision is well-documented in the PR body. Please ensure a follow-up ticket or note is tracked to harmonise this with development post-release, or confirm this is the intended permanent value for the release branch.

@Nir-Az
Nir-Az requested a review from sareluzi June 4, 2026 08:35
@Nir-Az
Nir-Az merged commit f5da542 into realsenseai:r/2.58.2 Jun 4, 2026
29 of 30 checks passed
@Nir-Az
Nir-Az deleted the cherry-rename-2582 branch June 4, 2026 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants