• Diff for "image_rotate"
Differences between revisions 1 and 26 (spanning 25 versions)
Revision 1 as of 2010-02-09 18:34:46
Size: 1778
Comment:
Revision 26 as of 2010-05-18 23:49:53
Size: 3987
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## repository: https://code.ros.org/svn/ros-pkg
Line 2: Line 3:

{{attachment:image_rotate.jpg}}
Line 4: Line 8:
== Example Use ==

To produce a version of the forearm camera view that always points up: {{{
rosrun image_rotate image_rotate image:=l_forearm_cam/image_color \
   rotated/image:=l_forearm_cam/image_color_rotated __name:=image_rotater
}}}
You can then view it with `image_view`.
{{{
rosrun image_view image_view image:=l_forearm_cam/image_color_rotated
}}}
It is easy to adjust the settings using `dynamic_reconfigure`.
{{{
rosrun dynamic_reconfigure reconfigure_gui image_rotater
}}}
Line 5: Line 24:
{{{
#!clearsilver CS/NodeAPI
node.0 {
name=image_rotate
desc=`image_rotate` is a node to rotate an image for visualization. The node takes a source vector and a target vector, and projects them onto the camera image. It then rotates the image by the angle neded to align the projection of the source vector with the projection of the target vector. The source and target vectors are specified in arbitrary TF frames allowing the rotation angle to vary dynamically as frames move relative to one another. With the default settings, the image will be rotated so that the top of the image matches the up direction the `base_link`.
sub{
0.name= image
0.type= sensor_msgs/Image
0.desc= Image to be rotated (the accompanying camera_info may also be subscribed to).
}
pub{
1.name= rotated/image
1.type= sensor_msgs/Image
1.desc= Rotated image
}
Line 14: Line 47:
0.desc=Frame in which the target vector is specified. Empty means the image frame. 0.desc=Frame in which the target vector is specified. Empty means the input frame.
Line 27: Line 60:
4.name= ~reference_frame_id 4.name= ~source_frame_id
Line 30: Line 63:
4.desc=Frame in which the reference vector is specified. Empty means the image frame.
5.name= ~reference_x
4.desc=Frame in which the source vector is specified. Empty means the input frame.
5.name= ~source_x
Line 35: Line 68:
6.name= ~reference_y 6.name= ~source_y
Line 39: Line 72:
7.name= ~reference_z 7.name= ~source_z
Line 46: Line 79:
8.desc=Frame to publish for the image's new orientation. Empty means add '_rotated' suffix.
9.name= ~max_angular_rate
9.default= 10.0
9.type= double
9.desc=Limits the rate at which the image can rotate (rad/s). Zero means no limit. Range: 0.0 to 100.0
8.desc=Frame to publish for the image's new orientation. Empty means add '_rotated' suffix to the image frame.
9.name= ~input_frame_id
9.default=
9.type= str
9.desc=Frame to use for the original camera image. Empty means that the frame in the image or camera_info should be used depending on use_camera_info.
10.name= ~use_camera_info
10.default= True
10.type= bool
10.desc=Indicates that the camera_info topic should be subscribed to to get the default input_frame_id. Otherwise the frame from the image message will be used.
11.name= ~max_angular_rate
11.default= 10.0
11.type= double
11.desc=Limits the rate at which the image can rotate (rad/s). Zero means no limit. Range: 0.0 to 100.0
12.name= ~output_image_size
12.default= 2.0
12.type= double
12.desc=Size of the output image as a function of the input image size. Can be varied continuously between the following special settings: 0 ensures no black ever appears, 1 is small image dimension, 2 is large image dimension, 3 is image diagonal. Range: 0.0 to 3.0
Line 54: Line 99:
}}}

  Show EOL distros: 

image_pipeline: camera_calibration | image_proc | image_rotate | image_view | stereo_image_proc

Package Summary

Contains a node that rotates an image stream in a way that minimizes the angle between a vector in some arbitrary frame and a vector in the camera frame. The frame of the outgoing image is published by the node.

This node is intended to allow camera images to be visualized in an orientation that is more intuitive than the hardware-constrained orientation of the physical camera. This is particularly helpful, for example, to show images from the PR2's forearm cameras with a consistent up direction, despite the fact that the forearms need to rotate in arbitrary ways during manipulation.

It is not recommended to use the output from this node for further computation, as it interpolates the source image, introduces black borders, and does not output a camera_info.

Package Summary

Contains a node that rotates an image stream in a way that minimizes the angle between a vector in some arbitrary frame and a vector in the camera frame. The frame of the outgoing image is published by the node.

This node is intended to allow camera images to be visualized in an orientation that is more intuitive than the hardware-constrained orientation of the physical camera. This is particularly helpful, for example, to show images from the PR2's forearm cameras with a consistent up direction, despite the fact that the forearms need to rotate in arbitrary ways during manipulation.

It is not recommended to use the output from this node for further computation, as it interpolates the source image, introduces black borders, and does not output a camera_info.

image_pipeline: camera_calibration | depth_image_proc | image_proc | image_rotate | image_view | stereo_image_proc

Package Summary

Contains a node that rotates an image stream in a way that minimizes the angle between a vector in some arbitrary frame and a vector in the camera frame. The frame of the outgoing image is published by the node.

This node is intended to allow camera images to be visualized in an orientation that is more intuitive than the hardware-constrained orientation of the physical camera. This is particularly helpful, for example, to show images from the PR2's forearm cameras with a consistent up direction, despite the fact that the forearms need to rotate in arbitrary ways during manipulation.

It is not recommended to use the output from this node for further computation, as it interpolates the source image, introduces black borders, and does not output a camera_info.

image_pipeline: camera_calibration | depth_image_proc | image_proc | image_rotate | image_view | stereo_image_proc

Package Summary

Contains a node that rotates an image stream in a way that minimizes the angle between a vector in some arbitrary frame and a vector in the camera frame. The frame of the outgoing image is published by the node.

This node is intended to allow camera images to be visualized in an orientation that is more intuitive than the hardware-constrained orientation of the physical camera. This is particularly helpful, for example, to show images from the PR2's forearm cameras with a consistent up direction, despite the fact that the forearms need to rotate in arbitrary ways during manipulation.

It is not recommended to use the output from this node for further computation, as it interpolates the source image, introduces black borders, and does not output a camera_info.

image_pipeline: camera_calibration | depth_image_proc | image_proc | image_rotate | image_view | stereo_image_proc

Package Summary

Contains a node that rotates an image stream in a way that minimizes the angle between a vector in some arbitrary frame and a vector in the camera frame. The frame of the outgoing image is published by the node.

This node is intended to allow camera images to be visualized in an orientation that is more intuitive than the hardware-constrained orientation of the physical camera. This is particularly helpful, for example, to show images from the PR2's forearm cameras with a consistent up direction, despite the fact that the forearms need to rotate in arbitrary ways during manipulation.

It is not recommended to use the output from this node for further computation, as it interpolates the source image, introduces black borders, and does not output a camera_info.

image_pipeline: camera_calibration | depth_image_proc | image_proc | image_publisher | image_rotate | image_view | stereo_image_proc

Package Summary

Contains a node that rotates an image stream in a way that minimizes the angle between a vector in some arbitrary frame and a vector in the camera frame. The frame of the outgoing image is published by the node.

This node is intended to allow camera images to be visualized in an orientation that is more intuitive than the hardware-constrained orientation of the physical camera. This is particularly helpful, for example, to show images from the PR2's forearm cameras with a consistent up direction, despite the fact that the forearms need to rotate in arbitrary ways during manipulation.

It is not recommended to use the output from this node for further computation, as it interpolates the source image, introduces black borders, and does not output a camera_info.

image_pipeline: camera_calibration | depth_image_proc | image_proc | image_publisher | image_rotate | image_view | stereo_image_proc

Package Summary

Contains a node that rotates an image stream in a way that minimizes the angle between a vector in some arbitrary frame and a vector in the camera frame. The frame of the outgoing image is published by the node.

This node is intended to allow camera images to be visualized in an orientation that is more intuitive than the hardware-constrained orientation of the physical camera. This is particularly helpful, for example, to show images from the PR2's forearm cameras with a consistent up direction, despite the fact that the forearms need to rotate in arbitrary ways during manipulation.

It is not recommended to use the output from this node for further computation, as it interpolates the source image, introduces black borders, and does not output a camera_info.

image_pipeline: camera_calibration | depth_image_proc | image_proc | image_publisher | image_rotate | image_view | stereo_image_proc

Package Summary

Contains a node that rotates an image stream in a way that minimizes the angle between a vector in some arbitrary frame and a vector in the camera frame. The frame of the outgoing image is published by the node.

This node is intended to allow camera images to be visualized in an orientation that is more intuitive than the hardware-constrained orientation of the physical camera. This is particularly helpful, for example, to show images from the PR2's forearm cameras with a consistent up direction, despite the fact that the forearms need to rotate in arbitrary ways during manipulation.

It is not recommended to use the output from this node for further computation, as it interpolates the source image, introduces black borders, and does not output a camera_info.

image_pipeline: camera_calibration | depth_image_proc | image_proc | image_publisher | image_rotate | image_view | stereo_image_proc

Package Summary

Contains a node that rotates an image stream in a way that minimizes the angle between a vector in some arbitrary frame and a vector in the camera frame. The frame of the outgoing image is published by the node.

This node is intended to allow camera images to be visualized in an orientation that is more intuitive than the hardware-constrained orientation of the physical camera. This is particularly helpful, for example, to show images from the PR2's forearm cameras with a consistent up direction, despite the fact that the forearms need to rotate in arbitrary ways during manipulation.

It is not recommended to use the output from this node for further computation, as it interpolates the source image, introduces black borders, and does not output a camera_info.

image_pipeline: camera_calibration | depth_image_proc | image_proc | image_publisher | image_rotate | image_view | stereo_image_proc

Package Summary

Contains a node that rotates an image stream in a way that minimizes the angle between a vector in some arbitrary frame and a vector in the camera frame. The frame of the outgoing image is published by the node.

This node is intended to allow camera images to be visualized in an orientation that is more intuitive than the hardware-constrained orientation of the physical camera. This is particularly helpful, for example, to show images from the PR2's forearm cameras with a consistent up direction, despite the fact that the forearms need to rotate in arbitrary ways during manipulation.

It is not recommended to use the output from this node for further computation, as it interpolates the source image, introduces black borders, and does not output a camera_info.

  • Maintainer status: developed
  • Maintainer: Vincent Rabaud <vincent.rabaud AT gmail DOT com>, Steven Macenski <stevenmacenski AT gmail DOT com>, Autonomoustuff team <software AT autonomoustuff DOT com>
  • Author: Blaise Gassend
  • License: BSD
  • Source: git https://github.com/ros-perception/image_pipeline.git (branch: melodic)
image_pipeline: camera_calibration | depth_image_proc | image_proc | image_publisher | image_rotate | image_view | stereo_image_proc

Package Summary

Contains a node that rotates an image stream in a way that minimizes the angle between a vector in some arbitrary frame and a vector in the camera frame. The frame of the outgoing image is published by the node.

This node is intended to allow camera images to be visualized in an orientation that is more intuitive than the hardware-constrained orientation of the physical camera. This is particularly helpful, for example, to show images from the PR2's forearm cameras with a consistent up direction, despite the fact that the forearms need to rotate in arbitrary ways during manipulation.

It is not recommended to use the output from this node for further computation, as it interpolates the source image, introduces black borders, and does not output a camera_info.

  • Maintainer status: maintained
  • Maintainer: Vincent Rabaud <vincent.rabaud AT gmail DOT com>, Autonomoustuff team <software AT autonomoustuff DOT com>
  • Author: Blaise Gassend
  • License: BSD
  • Source: git https://github.com/ros-perception/image_pipeline.git (branch: noetic)

image_rotate.jpg

Example Use

To produce a version of the forearm camera view that always points up:

rosrun image_rotate image_rotate image:=l_forearm_cam/image_color \
   rotated/image:=l_forearm_cam/image_color_rotated __name:=image_rotater

You can then view it with image_view.

rosrun image_view image_view image:=l_forearm_cam/image_color_rotated

It is easy to adjust the settings using dynamic_reconfigure.

rosrun dynamic_reconfigure reconfigure_gui image_rotater

ROS API

image_rotate

image_rotate is a node to rotate an image for visualization. The node takes a source vector and a target vector, and projects them onto the camera image. It then rotates the image by the angle neded to align the projection of the source vector with the projection of the target vector. The source and target vectors are specified in arbitrary TF frames allowing the rotation angle to vary dynamically as frames move relative to one another. With the default settings, the image will be rotated so that the top of the image matches the up direction the base_link.

Subscribed Topics

image (sensor_msgs/Image)
  • Image to be rotated (the accompanying camera_info may also be subscribed to).

Published Topics

rotated/image (sensor_msgs/Image)
  • Rotated image

Parameters

Dynamically Reconfigurable Parameters
See the dynamic_reconfigure package for details on dynamically reconfigurable parameters.
~target_frame_id (str, default: base_link)
  • Frame in which the target vector is specified. Empty means the input frame.
~target_x (double, default: 0.0)
  • X coordinate of the target vector Range: -10.0 to 10.0
~target_y (double, default: 0.0)
  • Y coordinate of the target vector Range: -10.0 to 10.0
~target_z (double, default: 1.0)
  • Z coordinate of the target vector Range: -10.0 to 10.0
~source_frame_id (str, default: )
  • Frame in which the source vector is specified. Empty means the input frame.
~source_x (double, default: 0.0)
  • X coordinate of the direction the target should be aligned with. Range: -10.0 to 10.0
~source_y (double, default: -1.0)
  • Y coordinate of the direction the target should be aligned with. Range: -10.0 to 10.0
~source_z (double, default: 0.0)
  • Z coordinate of the direction the target should be aligned with. Range: -10.0 to 10.0
~output_frame_id (str, default: )
  • Frame to publish for the image's new orientation. Empty means add '_rotated' suffix to the image frame.
~input_frame_id (str, default: )
  • Frame to use for the original camera image. Empty means that the frame in the image or camera_info should be used depending on use_camera_info.
~use_camera_info (bool, default: True)
  • Indicates that the camera_info topic should be subscribed to to get the default input_frame_id. Otherwise the frame from the image message will be used.
~max_angular_rate (double, default: 10.0)
  • Limits the rate at which the image can rotate (rad/s). Zero means no limit. Range: 0.0 to 100.0
~output_image_size (double, default: 2.0)
  • Size of the output image as a function of the input image size. Can be varied continuously between the following special settings: 0 ensures no black ever appears, 1 is small image dimension, 2 is large image dimension, 3 is image diagonal. Range: 0.0 to 3.0

Wiki: image_rotate (last edited 2017-04-28 16:25:25 by AndyZe)