image_undistort exists to handle all the odd situations image_proc doesn't quite cover. Some examples of this are
* working with images that don't have a camera_info topic
* undistortion of images using equidistant or other less common camera models
* turning a location in a distorted image into a bearing vector
If you have an image undistortion / stereo imaging problem that the library doesn't cover, create an issue and I'll look at adding it. Note that the automatic image size approach used will fail for cameras with a fov greater than 180 degrees.
This repo contains six related ros nodes-
* **[image_undistort_node](#image_undistort_node):** Undistorts and changes images intrinsics and resolution.
* **[stereo_info_node](#stereo_info_node):** Calculates the camera information needed for stereo rectification.
* **[stereo_undistort_node](#stereo_undistort_node):** Combines the functionality of the above two nodes to perform stereo image rectification.
* **[depth_node](#depth_node):** Converts two undistorted images and their camera information into a disparity image and a pointcloud.
* **[dense_stereo_node](#dense_stereo_node):** Performs the full dense stereo estimation (internally this node is just the stereo_undistort nodelet and the depth nodelet).
* **[point_to_bearing_node](#point_to_bearing_node):** Takes in a 2D image location and transforms it into a bearing vector.
## Dependencies
Image undistort depends on ROS, OpenCV and Eigen. The point to bearing node also depends on NLopt (installed with `apt install libnlopt-dev`) and will only be built if it is found.
## Supported Camera and Distortion Models
The only supported output is the pinhole camera model with no distortion.
Supported input models:
* Pinhole with no distortion
* Pinhole with radial-tangential distortion
* Pinhole with equidistant distortion
* Omnidirectional with no distortion
* Omindirectional with rad-tan distortion
* FOV
* Unified
* Extended Unified
* Double Sphere
# image_undistort_node:
A simple node for undistorting images. Handles plumb bob (aka radial-tangential), fov and equidistant distortion models. It can either use standard ros camera_info topics or load camera models in a form that is compatible with the camchain.yaml files produced by [Kalibr](https://github.com/ethz-asl/kalibr). Note this node can also be run as a nodelet named `image_undistort/ImageUndistortNodelet`.
## The node has several possible use cases:
* **Undistort images.** The default usage of the node, outputting an undistorted version of an input image.
* **Modify the image resolution and intrinsics.** The node supports projecting from and to any valid projection matrix and resolution.
* **Provide a camera_info topic for an image.** In this mode ros params are used to build a camera info message that is published in sync with the image messages. This allows the use of ros nodes that require camera info with devices and bags that do not provide it.
## Parameters:
* **queue size** The length of the queues the node uses for topics (default: 10).
* **input_camera_info_from_ros_params** If false the node will subscribe to a camera_info ros topic named input/camera_info to obtain the input camera parameters. If true the input camera parameters will be loaded from ros parameters. See the parameters format section for further details. (default: false).
* **output_camera_info_source** The source to use when obtaining the output camera parameters. The possible case-insensitive options are,
* *"auto_generated"* The default value. In this mode "good" output parameters are automatically generated based on the input image. focal length is the average of fx and fy of the input, the center point is in the center of the image, R=I and translation is preserved. Resolution is set to the largest area that contains no empty pixels. The size of the output can also be modified with the *scale* parameter.
* *"match_input"* The output projection matrix and resolution, exactly match the inputs.
* *"ros_params"* The output camera parameters are loaded from ros parameters. See the parameters format section for further details.
* *"camera_info"* The output parameters are found through subscribing to a camera_info ros topic named output/camera_info
* **input_camera_namespace** If the input camera parameters are loaded from ros parameters this is the namespace that will be searched. This is needed to allow both input and output to be loaded from parameters. (default: "input_camera")
* **output_camera_namespace** If the output camera parameters are loaded from ros parameters this is the namespace that will be searched. (default: "output_camera").
* **process_image** True to output a processed image, false if only a camera_info topic should be generated. (default: true).
* **undistort_image** True to undistort the images, false to keep the distortion. (default: true).
* **process_every_nth_frame** Used to temporarily down-sample the images, if it is <= 1 every frame will be processed. (default: 1).
* **output_image_type** Converts the output image to the specified format, set to the empty string "" to preserve the input type. See [the cv_bridge tutorial](http://wiki.ros.org/cv_bridge/Tutorials/UsingCvBridgeToConvertBetweenROSImagesAndOpenCVImages) for possible format strings. (default: "").
* **scale** Only used if **output_camera_info_source** is set to "auto_generated" or "match_input". The output focal length will be multiplied by this value. If "auto_generated" is set the image size will also be increased by this factor. (default: 1.0).
* **publish_tf** True to publish the tf between the input and output image. If the undistortion involves changes to the rotation matrix the frame that the image is in will change. This tf gives that change. (default: true)
* **output_frame** The name of the frame of the output images. (default: "output_camera")
* **rename_input_frame** If the input frame should be renamed in the published topics and tf tree. (default: false)
* **input_frame** Only used if **rename_input_frame** is true. The name of the frame of the input images. (default: "input_camera")
* **rename_radtan_plumb_bob** If true the radial-tangential distortion model will be called "plumb_bob" in the output camera_info, this is needed by some ros image processing nodes. If false it will be called "radtan". (default: false).
## Input/Output Topics
Many of these topics are dependent on the parameters set above and may not appear or may be renamed under some settings.
* **input/image** input image topic
* **input/camera_info** input camera info topic
* **output/image** output image topic
* **output/camera_info** output camera info topic
## Loading Camera Information from ROS Parameters:
Camera information can be loaded from ROS parameters. These parameters are typically set using <rosparam file="path_to_yaml_file"/>. The format used by this node is compatible with the camchains generated by [Kalibr](https://github.com/ethz-asl/kalibr). The follow steps are used when loading this information.
1. A 3x3 intrinscs matrix named **K** is searched for. If it is found it is loaded. If it is not found a 1x4 vector named **intrinsics** is loaded, this contains the parameters (fx, fy, cx, cy). If neither parameters are given the node displays an error and terminates.
2. A 1x2 vector named **resolution** is loaded which contains the parameters (width, height). Again, if not given the node displays an error and terminates.
3. A 4x4 transformation matrix **T_cn_cnm1** is searched for. If it is found it is loaded. Otherwise it is searched for under the name **T** and if found loaded. If neither are found the node continues.
4. A 4x3 projection matrix **P** is searched for. If it is found it is loaded. If **P** was found but **T** was not, **P** and **K** are used to construct **T**, otherwise **T** is set to identity. If **P** was not found it is constructed from **K** and **T**.
5. If an output is being loaded, the loading
没有合适的资源?快使用搜索试试~ 我知道了~
我运行OK的voxblox工作空间下的src文件夹,包含voxblox安装包以及所需包
共348个文件
h:94个
cc:67个
cpp:21个
需积分: 0 0 下载量 119 浏览量
2024-03-16
21:50:50
上传
评论
收藏 1.1MB ZIP 举报
温馨提示
我运行OK的voxblox工作空间下的src文件夹,包含voxblox安装包以及所需包,可以免去部署voxblox时下载各种包的麻烦。 我自己的环境是Ubuntu18.04,运行OK,src压缩包直接在工作空间下解压成src文件夹,编译命令参考voxblox官方给的编译命令。
资源推荐
资源详情
资源评论
收起资源包目录
我运行OK的voxblox工作空间下的src文件夹,包含voxblox安装包以及所需包 (348个子文件)
catkin_simple 8B
tsdf_server.cc 24KB
tsdf_integrator.cc 24KB
esdf_integrator.cc 20KB
marching_cubes.cc 17KB
test_tsdf_map.cc 15KB
simulation_server.cc 13KB
test_sdf_integrators.cc 12KB
test-transformation.cc 10KB
esdf_occ_integrator.cc 10KB
test-rotation.cc 9KB
icp.cc 9KB
block.cc 9KB
voxblox_eval.cc 9KB
esdf_server.cc 9KB
test_protobuf.cc 8KB
camera_model.cc 8KB
test_clear_spheres.cc 8KB
visualize_tsdf.cc 7KB
simulation_world.cc 7KB
transformer.cc 7KB
test_merge_integration.cc 7KB
esdf_map.cc 7KB
integrator_utils.cc 6KB
voxblox_mesh_visual.cc 6KB
timing.cc 6KB
test_tsdf_interpolator.cc 6KB
test_approx_hash_array.cc 4KB
mesh_ply.cc 4KB
intensity_server.cc 4KB
test_gtest-near.cc 4KB
kindr_msg_test.cc 4KB
test_glog-near.cc 4KB
test_gtest-equal-double.cc 4KB
test_glog-equal-double.cc 4KB
test-transformation-2d.cc 4KB
tsdf_map.cc 4KB
interactive_slider.cc 3KB
test_glog-equal.cc 3KB
evaluation_utils.cc 3KB
protobuf_utils.cc 3KB
test_gtest-equal.cc 3KB
test_glog-zero.cc 3KB
test_layer_utils.cc 3KB
test_gtest-zero.cc 3KB
export-rotation-quaternion.cc 3KB
kindr_tf_test.cc 3KB
intensity_integrator.cc 3KB
test_glog-zero-sized-types.cc 2KB
tsdf_to_esdf.cc 2KB
test_bucket_queue.cc 2KB
test_gtest-zero-sized-types.cc 2KB
test-main.cc 2KB
test_layer.cc 2KB
layer_utils.cc 2KB
eigen-checks.cc 2KB
voxblox_mesh_display.cc 2KB
sdf_ply.cc 2KB
simulation_eval.cc 1KB
neighbor_tools.cc 1KB
test-sim3.cc 1KB
voxel_utils.cc 1KB
export-transformation.cc 1KB
test_load_esdf.cc 604B
intensity_server_node.cc 411B
esdf_server_node.cc 401B
tsdf_server_node.cc 401B
objects.cc 84B
.clang-format 124B
FindNLOPT.cmake 1KB
use-system-installation-of-eigen.cmake 29B
config 272B
camera_parameters.cpp 24KB
depth.cpp 17KB
stereo_undistort.cpp 12KB
image_undistort.cpp 10KB
undistorter.cpp 8KB
stereo_info.cpp 5KB
point_to_bearing.cpp 5KB
dense_stereo_node.cpp 1KB
stereo_undistort_nodelet.cpp 630B
point_to_bearing_nodelet.cpp 626B
image_undistort_nodelet.cpp 623B
stereo_info_nodelet.cpp 571B
depth_nodelet.cpp 523B
stereo_undistort_node.cpp 491B
point_to_bearing_node.cpp 490B
image_undistort_node.cpp 489B
stereo_info_node.cpp 466B
depth_node.cpp 455B
module.cpp 308B
hello.cpp 228B
main.cpp 106B
description 73B
Doxyfile 105KB
catkin_simple-extras.cmake.em 9KB
exclude 240B
logo.gif 2KB
.gitignore 459B
.gitignore 260B
共 348 条
- 1
- 2
- 3
- 4
资源评论
诗筱涵
- 粉丝: 4791
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功