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

image_publisher: add field of view parameter (backport #985) #993

Merged
merged 1 commit into from
May 28, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented May 28, 2024

Currently, the default value for focal length when no camera info is provided defaults to 1.0 rendering whole approximate intrinsics and projection matrices useless. Based on this article, I propose a better approximation of the focal length based on the field of view of the camera.

For most of the use cases, users will either know the field of view of the camera the used, or they already calibrated it ahead of time.

If there is some documentation to fill. please let me know.

This PR should be straightforward to port it to Humble, Iron and Jazzy.


This is an automatic backport of pull request #985 done by [Mergify](https://mergify.com).

Currently, the default value for focal length when no camera info is
provided defaults to `1.0` rendering whole approximate intrinsics and
projection matrices useless. Based on [this
article](https://learnopencv.com/approximate-focal-length-for-webcams-and-cell-phone-cameras/),
I propose a better approximation of the focal length based on the field
of view of the camera.

For most of the use cases, users will either know the field of view of
the camera the used, or they already calibrated it ahead of time.

If there is some documentation to fill. please let me know.

This PR should be straightforward to port it to `Humble`, `Iron` and
`Jazzy`.

---------

Co-authored-by: Alejandro Hernández Cordero <[email protected]>
(cherry picked from commit 78d80f7)

# Conflicts:
#	image_publisher/doc/components.rst
@mergify mergify bot added the conflicts label May 28, 2024
Copy link
Author

mergify bot commented May 28, 2024

Cherry-pick of 78d80f7 has failed:

On branch mergify/bp/humble/pr-985
Your branch is up to date with 'origin/humble'.

You are currently cherry-picking commit 78d80f7.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   image_publisher/include/image_publisher/image_publisher.hpp
	modified:   image_publisher/src/image_publisher.cpp

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	deleted by us:   image_publisher/doc/components.rst

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@ahcorde ahcorde changed the title [rolling] image_publisher: add field of view parameter (backport #985) image_publisher: add field of view parameter (backport #985) May 28, 2024
@ahcorde ahcorde merged commit 38133fa into humble May 28, 2024
3 checks passed
@ahcorde ahcorde deleted the mergify/bp/humble/pr-985 branch May 28, 2024 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants