Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to check if all distortion coefficients are zero, not just first one #180

Closed
lucasw opened this issue Feb 29, 2016 · 4 comments
Closed

Comments

@lucasw
Copy link
Contributor

lucasw commented Feb 29, 2016

https://github.com/ros-perception/image_pipeline/blob/indigo/image_proc/src/nodelets/rectify.cpp#L125

// If zero distortion, just pass the message along
if (info_msg->D.empty() || info_msg->D[0] == 0.0)
{
...

That check ought to test every element of info_msg->D to see if they are all 0.0. This check probably always works with real camera calibrations, but synthetic ones (which could be used in tests or simulations) can have an exactly zero first coefficient and non-zero other coefficients.

lucasw added a commit to lucasw/vimjay that referenced this issue Feb 29, 2016
@lucasw
Copy link
Contributor Author

lucasw commented Feb 29, 2016

I can provide a pull request in a day or two.

@vrabaud
Copy link
Contributor

vrabaud commented Feb 29, 2016

Thx, please do. And please include a test.

@lucasw
Copy link
Contributor Author

lucasw commented Mar 1, 2016

A corresponding change is needed in vision_opencv to make a fix here work:

https://github.com/ros-perception/vision_opencv/blob/indigo/image_geometry/src/pinhole_camera_model.cpp#L130

cache_->distortion_state = (cam_info_.D.size() == 0 || (cam_info_.D[0] == 0.0)) ? NONE : CALIBRATED;

lucasw added a commit to lucasw/image_pipeline that referenced this issue Mar 1, 2016
… a test next. Currently testing manually with vimjay image_rect.launch (which brings up an rqt gui and camera info distortion coefficients can be dynamically reconfigured.
lucasw added a commit to lucasw/image_pipeline that referenced this issue Mar 1, 2016
…all_of), collapse this commit with above later.
lucasw added a commit to lucasw/image_pipeline that referenced this issue Mar 6, 2016
… debug it because I can't talk to rostest master on 22422. Don't push this, rebase when solution is found
lucasw added a commit to lucasw/image_pipeline that referenced this issue Mar 6, 2016
lucasw added a commit to lucasw/image_pipeline that referenced this issue Mar 6, 2016
…camera info parameters are still changing the image
lucasw added a commit to lucasw/image_pipeline that referenced this issue Mar 6, 2016
lucasw added a commit to lucasw/image_pipeline that referenced this issue Mar 6, 2016
Test with:

rostest --reuse-master --text image_proc test_rectify.xml

Can also test interactively with vimjay image_rect.launch, which brings up an rqt gui and camera info distortion coefficients can be dynamically reconfigured.
lucasw added a commit to lucasw/image_pipeline that referenced this issue Mar 6, 2016
Test with:

rostest --reuse-master --text image_proc test_rectify.xml

Can also test interactively with vimjay image_rect.launch, which brings up an rqt gui and camera info distortion coefficients can be dynamically reconfigured.
@vrabaud
Copy link
Contributor

vrabaud commented Mar 13, 2016

greatly fixed in #117

@vrabaud vrabaud closed this as completed Mar 13, 2016
wkentaro pushed a commit to wkentaro/image_pipeline that referenced this issue May 24, 2016
Test with:

rostest --reuse-master --text image_proc test_rectify.xml

Can also test interactively with vimjay image_rect.launch, which brings up an rqt gui and camera info distortion coefficients can be dynamically reconfigured.
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

No branches or pull requests

2 participants