|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
146 #ifndef YARP_ROSMSG_sensor_msgs_CameraInfo_h
147 #define YARP_ROSMSG_sensor_msgs_CameraInfo_h
168 std::vector<yarp::conf::float64_t>
D;
169 std::vector<yarp::conf::float64_t>
K;
170 std::vector<yarp::conf::float64_t>
R;
171 std::vector<yarp::conf::float64_t>
P;
325 for (
int i=0; i<len; i++) {
335 for (
int i=0; i<len; i++) {
345 for (
int i=0; i<len; i++) {
355 for (
int i=0; i<len; i++) {
458 for (
size_t i=0; i<
D.size(); i++) {
465 for (
size_t i=0; i<
K.size(); i++) {
472 for (
size_t i=0; i<
R.size(); i++) {
479 for (
size_t i=0; i<
P.size(); i++) {
513 static constexpr
const char*
typeName =
"sensor_msgs/CameraInfo";
516 static constexpr
const char*
typeChecksum =
"c9a58c1b0b154e0e6da7578cb991d214";
520 # This message defines meta information for a camera. It should be in a\n\
521 # camera namespace on topic \"camera_info\" and accompanied by up to five\n\
522 # image topics named:\n\
524 # image_raw - raw data from the camera driver, possibly Bayer encoded\n\
525 # image - monochrome, distorted\n\
526 # image_color - color, distorted\n\
527 # image_rect - monochrome, rectified\n\
528 # image_rect_color - color, rectified\n\
530 # The image_pipeline contains packages (image_proc, stereo_image_proc)\n\
531 # for producing the four processed image topics from image_raw and\n\
532 # camera_info. The meaning of the camera parameters are described in\n\
533 # detail at http://www.ros.org/wiki/image_pipeline/CameraInfo.\n\
535 # The image_geometry package provides a user-friendly interface to\n\
536 # common operations using this meta information. If you want to, e.g.,\n\
537 # project a 3d point into image coordinates, we strongly recommend\n\
538 # using image_geometry.\n\
540 # If the camera is uncalibrated, the matrices D, K, R, P should be left\n\
541 # zeroed out. In particular, clients may assume that K[0] == 0.0\n\
542 # indicates an uncalibrated camera.\n\
544 #######################################################################\n\
545 # Image acquisition info #\n\
546 #######################################################################\n\
548 # Time of image acquisition, camera coordinate frame ID\n\
549 Header header # Header timestamp should be acquisition time of image\n\
550 # Header frame_id should be optical frame of camera\n\
551 # origin of frame should be optical center of camera\n\
552 # +x should point to the right in the image\n\
553 # +y should point down in the image\n\
554 # +z should point into the plane of the image\n\
557 #######################################################################\n\
558 # Calibration Parameters #\n\
559 #######################################################################\n\
560 # These are fixed during camera calibration. Their values will be the #\n\
561 # same in all messages until the camera is recalibrated. Note that #\n\
562 # self-calibrating systems may \"recalibrate\" frequently. #\n\
564 # The internal parameters can be used to warp a raw (distorted) image #\n\
566 # 1. An undistorted image (requires D and K) #\n\
567 # 2. A rectified image (requires D, K, R) #\n\
568 # The projection matrix P projects 3D points into the rectified image.#\n\
569 #######################################################################\n\
571 # The image dimensions with which the camera was calibrated. Normally\n\
572 # this will be the full camera resolution in pixels.\n\
576 # The distortion model used. Supported models are listed in\n\
577 # sensor_msgs/distortion_models.h. For most cameras, \"plumb_bob\" - a\n\
578 # simple model of radial and tangential distortion - is sufficient.\n\
579 string distortion_model\n\
581 # The distortion parameters, size depending on the distortion model.\n\
582 # For \"plumb_bob\", the 5 parameters are: (k1, k2, t1, t2, k3).\n\
585 # Intrinsic camera matrix for the raw (distorted) images.\n\
589 # Projects 3D points in the camera coordinate frame to 2D pixel\n\
590 # coordinates using the focal lengths (fx, fy) and principal point\n\
592 float64[9] K # 3x3 row-major matrix\n\
594 # Rectification matrix (stereo cameras only)\n\
595 # A rotation matrix aligning the camera coordinate system to the ideal\n\
596 # stereo image plane so that epipolar lines in both stereo images are\n\
598 float64[9] R # 3x3 row-major matrix\n\
600 # Projection/camera matrix\n\
602 # P = [ 0 fy' cy' Ty]\n\
604 # By convention, this matrix specifies the intrinsic (camera) matrix\n\
605 # of the processed (rectified) image. That is, the left 3x3 portion\n\
606 # is the normal camera intrinsic matrix for the rectified image.\n\
607 # It projects 3D points in the camera coordinate frame to 2D pixel\n\
608 # coordinates using the focal lengths (fx', fy') and principal point\n\
609 # (cx', cy') - these may differ from the values in K.\n\
610 # For monocular cameras, Tx = Ty = 0. Normally, monocular cameras will\n\
611 # also have R = the identity and P[1:3,1:3] = K.\n\
612 # For a stereo pair, the fourth column [Tx Ty 0]' is related to the\n\
613 # position of the optical center of the second camera in the first\n\
614 # camera's frame. We assume Tz = 0 so both cameras are in the same\n\
615 # stereo image plane. The first camera always has Tx = Ty = 0. For\n\
616 # the right (second) camera of a horizontal stereo pair, Ty = 0 and\n\
617 # Tx = -fx' * B, where B is the baseline between the cameras.\n\
618 # Given a 3D point [X Y Z]', the projection (x, y) of the point onto\n\
619 # the rectified image is given by:\n\
620 # [u v w]' = P * [X Y Z 1]'\n\
623 # This holds for both images of a stereo pair.\n\
624 float64[12] P # 3x4 row-major matrix\n\
627 #######################################################################\n\
628 # Operational Parameters #\n\
629 #######################################################################\n\
630 # These define the image region actually captured by the camera #\n\
631 # driver. Although they affect the geometry of the output image, they #\n\
632 # may be changed freely without recalibrating the camera. #\n\
633 #######################################################################\n\
635 # Binning refers here to any camera setting which combines rectangular\n\
636 # neighborhoods of pixels into larger \"super-pixels.\" It reduces the\n\
637 # resolution of the output image to\n\
638 # (width / binning_x) x (height / binning_y).\n\
639 # The default values binning_x = binning_y = 0 is considered the same\n\
640 # as binning_x = binning_y = 1 (no subsampling).\n\
644 # Region of interest (subwindow of full camera resolution), given in\n\
645 # full resolution (unbinned) image coordinates. A particular ROI\n\
646 # always denotes the same window of pixels on the camera sensor,\n\
647 # regardless of binning settings.\n\
648 # The default setting of roi (all values 0) is considered the same as\n\
649 # full resolution (roi.width = width, roi.height = height).\n\
650 RegionOfInterest roi\n\
652 ================================================================================\n\
653 MSG: std_msgs/Header\n\
654 # Standard metadata for higher-level stamped data types.\n\
655 # This is generally used to communicate timestamped data \n\
656 # in a particular coordinate frame.\n\
658 # sequence ID: consecutively increasing ID \n\
660 #Two-integer timestamp that is expressed as:\n\
661 # * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')\n\
662 # * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')\n\
663 # time-handling sugar is provided by the client library\n\
665 #Frame this data is associated with\n\
670 ================================================================================\n\
671 MSG: sensor_msgs/RegionOfInterest\n\
672 # This message is used to specify a region of interest within an image.\n\
674 # When used to specify the ROI setting of the camera when the image was\n\
675 # taken, the height and width fields should either match the height and\n\
676 # width fields for the associated image; or height = width = 0\n\
677 # indicates that the full resolution image was captured.\n\
679 uint32 x_offset # Leftmost pixel of the ROI\n\
680 # (0 if the ROI includes the left edge of the image)\n\
681 uint32 y_offset # Topmost pixel of the ROI\n\
682 # (0 if the ROI includes the top edge of the image)\n\
683 uint32 height # Height of ROI\n\
684 uint32 width # Width of ROI\n\
686 # True if a distinct rectified ROI should be calculated from the \"raw\"\n\
687 # ROI in this message. Typically this should be False if the full image\n\
688 # is captured (ROI not used), and True if a subwindow is captured (ROI\n\
706 #endif // YARP_ROSMSG_sensor_msgs_CameraInfo_h
bool readString(std::string &str, bool *is_vocab=nullptr)
bool writeBare(yarp::os::ConnectionWriter &connection) const override
static constexpr const char * typeChecksum
virtual void appendFloat64(yarp::conf::float64_t data)=0
Send a representation of a 64-bit floating point number to the network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
virtual bool read(yarp::os::idl::WireReader &reader)
yarp::os::idl::BareStyle< yarp::rosmsg::sensor_msgs::CameraInfo > rosStyle
virtual bool isBareMode() const =0
Check if the connection is bare mode.
#define BOTTLE_TAG_STRING
yarp::rosmsg::std_msgs::Header header
virtual yarp::conf::float64_t expectFloat64()=0
Read a 64-bit floating point number from the network connection.
virtual bool isError() const =0
yarp::rosmsg::sensor_msgs::RegionOfInterest roi
static Type byName(const char *name)
virtual std::int32_t expectInt32()=0
Read a 32-bit integer from the network connection.
Type & addProperty(const char *key, const Value &val)
An interface for writing to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
virtual bool isError() const =0
virtual bool convertTextMode()=0
Reads in a standard description in text mode, and converts it to a standard description in binary.
yarp::os::Type getType() const override
A "tamed" Portable, that promises to serialize itself in an IDL-friendly way.
virtual bool isBareMode() const =0
Check if the connection is bare mode.
yarp::os::idl::BottleStyle< yarp::rosmsg::sensor_msgs::CameraInfo > bottleStyle
std::vector< yarp::conf::float64_t > P
std::vector< yarp::conf::float64_t > D
bool readBottle(yarp::os::ConnectionReader &connection) override
virtual bool convertTextMode()=0
Converts a standard description in binary into a textual description, if the connection is in text-mo...
virtual void appendInt32(std::int32_t data)=0
Send a representation of a 32-bit integer to the network connection.
IDL-friendly connection reader.
An interface for reading from a network connection.
static constexpr const char * typeText
#define BOTTLE_TAG_FLOAT64
std::int32_t expectInt32()
std::vector< yarp::conf::float64_t > R
The main, catch-all namespace for YARP.
virtual void appendExternalBlock(const char *data, size_t len)=0
Send a block of data to the network connection, without making a copy.
virtual bool expectBlock(char *data, size_t len)=0
Read a block of data from the network connection.
std::string distortion_model
A single value (typically within a Bottle).
bool writeBottle(yarp::os::ConnectionWriter &connection) const override
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr const char * typeName
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
std::vector< yarp::conf::float64_t > K
bool readBare(yarp::os::ConnectionReader &connection) override
virtual bool write(const yarp::os::idl::WireWriter &writer) const