Commit f805197
Add missing return in Backward distortion functions for near-zero radius guard
Summary:
All 6 `Backward` methods in camera distortion structs (Disto2, Disto24, Disto2468, DistoBrown, Disto62, DistoDualFisheye) have an early-exit guard for near-zero distorted radius: when `rd < epsilon`, the code sets `undistorted = point` (identity undistortion). However, the guard was missing a `return` statement, so execution always fell through to the Newton-Raphson iterative solver.
This makes the guard completely ineffective. For points very near the optical center, the Newton-Raphson solver divides near-zero values by near-zero distortion factors, potentially producing NaN or wildly incorrect undistorted coordinates.
This diff adds `return;` after the identity assignment in all 6 Backward methods, making the early-exit guard take effect.
___
overriding_review_checks_triggers_an_audit_and_retroactive_review
Oncall Short Name: mrservice_triage
Differential Revision: D100590112
fbshipit-source-id: 40839c830f2424126e1727906324f635d5c5423a1 parent 8acdab7 commit f805197
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
152 | 153 | | |
153 | 154 | | |
154 | 155 | | |
| 156 | + | |
155 | 157 | | |
156 | 158 | | |
157 | 159 | | |
| |||
268 | 270 | | |
269 | 271 | | |
270 | 272 | | |
| 273 | + | |
271 | 274 | | |
272 | 275 | | |
273 | 276 | | |
| |||
421 | 424 | | |
422 | 425 | | |
423 | 426 | | |
| 427 | + | |
424 | 428 | | |
425 | 429 | | |
426 | 430 | | |
| |||
627 | 631 | | |
628 | 632 | | |
629 | 633 | | |
| 634 | + | |
630 | 635 | | |
631 | 636 | | |
632 | 637 | | |
| |||
774 | 779 | | |
775 | 780 | | |
776 | 781 | | |
| 782 | + | |
777 | 783 | | |
778 | 784 | | |
779 | 785 | | |
| |||
0 commit comments