Error in ViewControl::ConvertFromPinholeCameraParameters in ViewControl.cpp
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- computer-graphics
Research direction
Start in ViewControl.cpp at ViewControl::ConvertFromPinholeCameraParameters and inspect the conditional shown in the issue. Reproduce the camera-parameter conversion case and verify that the condition evaluates the principal-point comparison correctly, with the existing warning and return behavior preserved when dimensions do not match.
Written by the indexing model from the issue text.
Description
Checklist
- I have searched for similar issues.
- For Python issues, I have tested with the latest development wheel.
- I have checked the release documentation and the latest documentation (for
mainbranch).
Describe the issue
I found that, in the code "ViewControl.cpp", there is an error in bool ViewControl::ConvertFromPinholeCameraParameters.
The conditional statement mistakenly uses = instead of -:
‘’‘
if (!allow_arbitrary &&
(window_height_ <= 0 || window_width_ <= 0 ||
window_height_ != intrinsic.height_ ||
window_width_ != intrinsic.width_ ||
std::abs(intrinsic.intrinsic_matrix_(0, 2) -
((double)window_width_ / 2.0 - 0.5)) > threshold ||
std::abs(intrinsic.intrinsic_matrix_(1, 2) =
((double)window_height_ / 2.0 - 0.5)) > threshold)) {
utility::LogWarning(
"[ViewControl] ConvertFromPinholeCameraParameters() failed "
"because window height and width do not match.");
return false;
}
’‘’
Steps to reproduce the bug
if (!allow_arbitrary &&
(window_height_ <= 0 || window_width_ <= 0 ||
window_height_ != intrinsic.height_ ||
window_width_ != intrinsic.width_ ||
std::abs(intrinsic.intrinsic_matrix_(0, 2) -
((double)window_width_ / 2.0 - 0.5)) > threshold ||
std::abs(intrinsic.intrinsic_matrix_(1, 2) =
((double)window_height_ / 2.0 - 0.5)) > threshold)) {
utility::LogWarning(
"[ViewControl] ConvertFromPinholeCameraParameters() failed "
"because window height and width do not match.");
return false;
}
Error message
The conditional statement mistakenly uses = instead of -:
Expected behavior
No response
Open3D, Python and System information
Open3D = 0.18.0
Additional information
No response
- Dominant language
- C++
- Stars
- 14k
- Forks
- 2.6k
- Avg merge
- 5d 18h
- Merged PRs (30d)
- 6
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from isl-org/Open3D
-
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 4/5 3-5 days Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·