-
Notifications
You must be signed in to change notification settings - Fork 734
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
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]>
- Loading branch information
1 parent
5b6dec1
commit 38133fa
Showing
3 changed files
with
40 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Nodes and Components | ||
==================== | ||
|
||
image_publisher::ImagePublisher | ||
------------------------------- | ||
Component to publish sensor_msgs/Image, requires filename argument. | ||
Also avialable as a ROS 2 node named ``image_publisher``. | ||
|
||
Published Topics | ||
^^^^^^^^^^^^^^^^ | ||
* **image_raw** (sensor_msgs/Image): ROS Image message of your input file. | ||
* **camera_info** (sensor_msgs/CameraInfo): CameraInfo published along with Image. | ||
|
||
Parameters | ||
^^^^^^^^^^ | ||
* **filename** (string, default: ""): Name of image file to be published. | ||
* **field_of_view** (double, default: 0): Camera field of view (deg) used to calculate focal length for camera info topic. | ||
* **flip_horizontal** (bool, default: false): Flip output image horizontally. | ||
* **flip_vertical** (bool, default: false): Flip output image vertically. | ||
* **frame_id** (string, default: "camera") Frame id inserted in published | ||
image and camera_info. | ||
* **publish_rate** (double, default: 10): Rate to publish image (hz). | ||
* **camera_info_uri** (string, default: ""): Path to camera info. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters