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

Fix out of bounds indexes when retrieving camera matrix for rectified images #47

Merged
merged 2 commits into from
Jun 4, 2024

Conversation

bjsowa
Copy link
Member

@bjsowa bjsowa commented Jun 4, 2024

After merging #46 I noticed that the ROS2 port tries to fit 3x4 Projection matrix into 3x3 cv::Mat which results in out of bounds indexes. This did not raise an exception as OpenCv does array range checking only in Debug mode.

This PR makes the camera matrix retrieval for rectified images work the same as in ROS1 version after applying fix from @real-Sandip-Das

I also added image_is_rectified parameter, which was missing for a long time, to the example yaml file.

@bjsowa bjsowa merged commit 988501b into ros2 Jun 4, 2024
5 checks passed
@bjsowa
Copy link
Member Author

bjsowa commented Jun 4, 2024

@Mergifyio backport iron humble

Copy link
Contributor

mergify bot commented Jun 4, 2024

backport iron humble

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Jun 4, 2024
… images (#47)

* Fix out of bounds indexes when retrieving camera matrix for rectified images

Co-authored-by: Sandip Das <[email protected]>

* Add image_is_rectified parameter to example yaml config

---------

Co-authored-by: Sandip Das <[email protected]>
(cherry picked from commit 988501b)
mergify bot pushed a commit that referenced this pull request Jun 4, 2024
… images (#47)

* Fix out of bounds indexes when retrieving camera matrix for rectified images

Co-authored-by: Sandip Das <[email protected]>

* Add image_is_rectified parameter to example yaml config

---------

Co-authored-by: Sandip Das <[email protected]>
(cherry picked from commit 988501b)
@bjsowa bjsowa deleted the fix/out-of-bound-indexes branch June 4, 2024 16:35
bjsowa added a commit that referenced this pull request Jun 4, 2024
… images (#47) (#48)

* Fix out of bounds indexes when retrieving camera matrix for rectified images

Co-authored-by: Sandip Das <[email protected]>

* Add image_is_rectified parameter to example yaml config

---------

Co-authored-by: Sandip Das <[email protected]>
(cherry picked from commit 988501b)

Co-authored-by: Błażej Sowa <[email protected]>
bjsowa added a commit that referenced this pull request Jun 4, 2024
… images (#47) (#49)

* Fix out of bounds indexes when retrieving camera matrix for rectified images

Co-authored-by: Sandip Das <[email protected]>

* Add image_is_rectified parameter to example yaml config

---------

Co-authored-by: Sandip Das <[email protected]>
(cherry picked from commit 988501b)

Co-authored-by: Błażej Sowa <[email protected]>
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.

1 participant