-
Notifications
You must be signed in to change notification settings - Fork 728
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
[rolling] image_publisher: add field of view parameter #985
[rolling] image_publisher: add field of view parameter #985
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mind to target rolling
? then we can backport this to the other distros.
Co-authored-by: Alejandro Hernández Cordero <[email protected]>
c9cc228
to
4762cac
Compare
@ahcorde the changes were retargeted to |
camera_info_.k = {1, 0, static_cast<float>(camera_info_.width / 2), 0, 1, | ||
|
||
// Based on https://learnopencv.com/approximate-focal-length-for-webcams-and-cell-phone-cameras/ | ||
double f_approx = (camera_info_.width / 2) / std::tan((field_of_view_ * M_PI / 180) / 2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the default value 50
returning 1
? as the current behavior ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't, and I forgot to account for breaking changes. I changed it now so when FOV is 0 or less, it disables the whole feature and uses 1.0 for focal length instead. The default vale is now zero as well, so now the whole thing is not breaking anything.
https://github.com/Mergifyio backport jazzy humble iron |
✅ Backports have been created
|
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)
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
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
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`. <hr>This is an automatic backport of pull request #985 done by [Mergify](https://mergify.com). Co-authored-by: Krzysztof Wojciechowski <[email protected]>
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`. <hr>This is an automatic backport of pull request #985 done by [Mergify](https://mergify.com). Co-authored-by: Krzysztof Wojciechowski <[email protected]>
…992) 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`. <hr>This is an automatic backport of pull request #985 done by [Mergify](https://mergify.com). Co-authored-by: Krzysztof Wojciechowski <[email protected]>
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
andJazzy
.