.. _package-rst-vision: ==================== Package rst.vision ==================== In computer science, image processing is any form of signal processing for which the input is an image. This package contains data types for representing images (:py:class:`Image `) or things which can be recognized in images (e.g. :py:class:`Face `). .. seealso:: Wikipedia article containing the definition above http://en.wikipedia.org/wiki/Image_processing Messages ======== .. container:: mess4ge-multi .. container:: mess4ge-graph .. digraph:: message_graph fontname="Arial"; fontsize=11; stylesheet="../_static/graphs.css"; node [fontsize=11,fontname="Arial"] edge [fontsize=11,fontname="Arial"] "25" [label=<
Images
Imageimages
>,shape=box,style=filled,fillcolor="white"]; "26" [label=<
Image
OCTET-VECTORdata
UINT32width
UINT32height
UINT32channels
Depthdepth
ColorModecolor_mode
DataOrderdata_order
>,shape=box,style=filled,fillcolor="white"]; "29" [label=<
DataOrder
DATA_SEPARATE0
DATA_INTERLEAVED1
>,shape=box,style=filled,fillcolor="white"]; "28" [label=<
ColorMode
COLOR_GRAYSCALE0
COLOR_RGB1
COLOR_BGR2
COLOR_YUV4
COLOR_YUV4228
>,shape=box,style=filled,fillcolor="white"]; "27" [label=<
Depth
DEPTH_8U8
DEPTH_16U16
DEPTH_32F32
>,shape=box,style=filled,fillcolor="white"]; "20" [label=<
AugmentedPointCloudSet3DFloat
AugmentedPointCloud3DFloatclouds
>,shape=box,style=filled,fillcolor="white"]; "21" [label=<
AugmentedPointCloud3DFloat
PointCloud3DFloatpoints
Channelchannels
>,shape=box,style=filled,fillcolor="white"]; "24" [label=<
Channel
ASCII-STRINGname
FLOAT32values
>,shape=box,style=filled,fillcolor="white"]; "22" [label=<
PointCloud3DFloat
Vec3DFloatpoints
>,shape=box,style=filled,fillcolor="white"]; "23" [label=<
Vec3DFloat
FLOAT32x
FLOAT32y
FLOAT32z
>,shape=box,style=filled,fillcolor="white"]; "19" [label=<
Faces
Facefaces
UINT32width
UINT32height
>,shape=box,style=filled,fillcolor="white"]; "14" [label=<
LocatedFaceCollection
LocatedFaceelement
>,shape=box,style=filled,fillcolor="white"]; "15" [label=<
LocatedFace
Faceface
Translationlocation
Rotationorientation
>,shape=box,style=filled,fillcolor="white"]; "16" [label=<
Face
BoundingBoxregion
FLOAT64confidence
>,shape=box,style=filled,fillcolor="white"]; "17" [label=<
BoundingBox
Vec2DInttop_left
UINT32width
UINT32height
UINT32image_width
UINT32image_height
>,shape=box,style=filled,fillcolor="white"]; "18" [label=<
Vec2DInt
INT32x
INT32y
>,shape=box,style=filled,fillcolor="white"]; "12" [label=<
LaserScanCollection
LaserScanelement
>,shape=box,style=filled,fillcolor="white"]; "13" [label=<
LaserScan
FLOAT32scan_values
FLOAT32scan_angle
>,shape=box,style=filled,fillcolor="white"]; "3" [label=<
LocatedXYZImageCollection
LocatedXYZImageelement
>,shape=box,style=filled,fillcolor="white"]; "4" [label=<
LocatedXYZImage
SimpleXYZImageimage
CameraPosecamera
ViewFrustumfrustum
>,shape=box,style=filled,fillcolor="white"]; "10" [label=<
ViewFrustum
FieldOfViewfov
FLOAT32minimal_distance
FLOAT32maximal_distance
>,shape=box,style=filled,fillcolor="white"]; "11" [label=<
FieldOfView
FLOAT32horizontal_aov
FLOAT32vertical_aov
>,shape=box,style=filled,fillcolor="white"]; "5" [label=<
CameraPose
CoordinateFramecoordinate_frame
Posepose
>,shape=box,style=filled,fillcolor="white"]; "7" [label=<
Pose
Translationtranslation
Rotationrotation
>,shape=box,style=filled,fillcolor="white"]; "9" [label=<
Rotation
FLOAT64qw
FLOAT64qx
FLOAT64qy
FLOAT64qz
ASCII-STRINGframe_id
>,shape=box,style=filled,fillcolor="white"]; "8" [label=<
Translation
FLOAT64x
FLOAT64y
FLOAT64z
ASCII-STRINGframe_id
>,shape=box,style=filled,fillcolor="white"]; "6" [label=<
CoordinateFrame
CAMERA_IMAGE_FRAME0
CAMERA_X_UP_FRAME1
CAMERA_Y_UP_FRAME2
LASER_FRAME3
SCREEN_FRAME4
>,shape=box,style=filled,fillcolor="white"]; "1" [label=<
SimpleXYZImageCollection
SimpleXYZImageelement
>,shape=box,style=filled,fillcolor="white"]; "2" [label=<
SimpleXYZImage
UINT32width
UINT32height
FLOAT32x
FLOAT32y
FLOAT32z
>,shape=box,style=filled,fillcolor="white"]; "25":images -> "26" []; "26" -> "29" []; "26" -> "28" []; "26" -> "27" []; "26":data_order -> "29" []; "26":color_mode -> "28" []; "26":depth -> "27" []; "20":clouds -> "21" []; "21" -> "24" []; "21":channels -> "24" []; "21":points -> "22" []; "22":points -> "23" []; "19":faces -> "16" []; "14":element -> "15" []; "15":orientation -> "9" []; "15":location -> "8" []; "15":face -> "16" []; "16":region -> "17" []; "17":top_left -> "18" []; "12":element -> "13" []; "3":element -> "4" []; "4":frustum -> "10" []; "4":camera -> "5" []; "4":image -> "2" []; "10":fov -> "11" []; "5" -> "6" []; "5":pose -> "7" []; "5":coordinate_frame -> "6" []; "7":rotation -> "9" []; "7":translation -> "8" []; "1":element -> "2" []; .. container:: mess4ge-list .. container:: messages * :ref:`SimpleXYZImageCollection ` * :ref:`LocatedXYZImageCollection ` * :ref:`LaserScanCollection ` * :ref:`LocatedFaceCollection ` * :ref:`Faces ` * :ref:`AugmentedPointCloudSet3DFloat ` * :ref:`AugmentedPointCloud3DFloat ` * :ref:`LocatedXYZImage ` * :ref:`SimpleXYZImage ` * :ref:`LaserScan ` * :ref:`Images ` * :ref:`LocatedFace ` * :ref:`Face ` * :ref:`Image ` .. container:: clearer clearer: should be made invisible via css .. _message-rst-vision-simplexyzimagecollection: Message SimpleXYZImageCollection -------------------------------- .. container:: message-rst-vision-simplexyzimagecollection-multi .. container:: message-rst-vision-simplexyzimagecollection-documentation .. py:class:: rst.vision.SimpleXYZImageCollection Collection of :py:class:`SimpleXYZImage ` instances. Auto-generated. .. py:attribute:: element :type: array of :py:class:`rst.vision.SimpleXYZImage` The individual elements of the collection. Constraints regarding the empty collection, sorting, duplicated entries etc. are use case specific. .. container:: message-rst-vision-simplexyzimagecollection-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/vision/SimpleXYZImageCollection.proto :lines: 12-22 :language: protobuf :emphasize-lines: 9-9 .. _message-rst-vision-locatedxyzimagecollection: Message LocatedXYZImageCollection --------------------------------- .. container:: message-rst-vision-locatedxyzimagecollection-multi .. container:: message-rst-vision-locatedxyzimagecollection-documentation .. py:class:: rst.vision.LocatedXYZImageCollection Collection of :py:class:`LocatedXYZImage ` instances. Auto-generated. .. py:attribute:: element :type: array of :py:class:`rst.vision.LocatedXYZImage` The individual elements of the collection. Constraints regarding the empty collection, sorting, duplicated entries etc. are use case specific. .. container:: message-rst-vision-locatedxyzimagecollection-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/vision/LocatedXYZImageCollection.proto :lines: 12-22 :language: protobuf :emphasize-lines: 9-9 .. _message-rst-vision-laserscancollection: Message LaserScanCollection --------------------------- .. container:: message-rst-vision-laserscancollection-multi .. container:: message-rst-vision-laserscancollection-documentation .. py:class:: rst.vision.LaserScanCollection Collection of :py:class:`LaserScan ` instances. Auto-generated. .. py:attribute:: element :type: array of :py:class:`rst.vision.LaserScan` The individual elements of the collection. Constraints regarding the empty collection, sorting, duplicated entries etc. are use case specific. .. container:: message-rst-vision-laserscancollection-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/vision/LaserScanCollection.proto :lines: 12-22 :language: protobuf :emphasize-lines: 9-9 .. _message-rst-vision-locatedfacecollection: Message LocatedFaceCollection ----------------------------- .. container:: message-rst-vision-locatedfacecollection-multi .. container:: message-rst-vision-locatedfacecollection-documentation .. py:class:: rst.vision.LocatedFaceCollection Collection of :py:class:`LocatedFace ` instances. Auto-generated. .. py:attribute:: element :type: array of :py:class:`rst.vision.LocatedFace` The individual elements of the collection. Constraints regarding the empty collection, sorting, duplicated entries etc. are use case specific. .. container:: message-rst-vision-locatedfacecollection-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/vision/LocatedFaceCollection.proto :lines: 12-22 :language: protobuf :emphasize-lines: 9-9 .. _message-rst-vision-faces: Message Faces ------------- .. container:: message-rst-vision-faces-multi .. container:: message-rst-vision-faces-documentation .. py:class:: rst.vision.Faces A list of faces with information about the dimensions of a source image used by a face detector. This allows interpretation of the bounding box data contained in the Face types. .. codeauthor:: Sebastian Wrede .. py:attribute:: faces :type: array of :py:class:`rst.vision.Face` List of faces. .. py:attribute:: width :type: :py:class:`UINT32` **Unit**: pixel Width of the source image. .. py:attribute:: height :type: :py:class:`UINT32` **Unit**: pixel Height of the source image. .. container:: message-rst-vision-faces-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/vision/Faces.proto :lines: 17-36 :language: protobuf :emphasize-lines: 6-6,12-12,18-18 .. _message-rst-vision-augmentedpointcloudset3dfloat: Message AugmentedPointCloudSet3DFloat ------------------------------------- .. container:: message-rst-vision-augmentedpointcloudset3dfloat-multi .. container:: message-rst-vision-augmentedpointcloudset3dfloat-documentation .. py:class:: rst.vision.AugmentedPointCloudSet3DFloat A set of augmented 3D Point clouds. .. codeauthor:: Jan Moringen .. py:attribute:: clouds :type: array of :py:class:`rst.vision.AugmentedPointCloud3DFloat` Empty collection of clouds is allowed. The order of cloud objects is not significant. .. container:: message-rst-vision-augmentedpointcloudset3dfloat-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/vision/AugmentedPointCloudSet3DFloat.proto :lines: 14-22 :language: protobuf :emphasize-lines: 7-7 .. _message-rst-vision-augmentedpointcloud3dfloat: Message AugmentedPointCloud3DFloat ---------------------------------- .. container:: message-rst-vision-augmentedpointcloud3dfloat-multi .. container:: message-rst-vision-augmentedpointcloud3dfloat-documentation .. py:class:: rst.vision.AugmentedPointCloud3DFloat Associates a set of scalar values (such as color information) to each point of a point cloud. .. codeauthor:: Johannes Wienke .. py:attribute:: points :type: :py:class:`rst.geometry.PointCloud3DFloat` Geometry of the point cloud augmented by the data in :py:attr:`channels `. .. py:attribute:: channels :type: array of :py:class:`rst.vision.AugmentedPointCloud3DFloat.Channel` An optional set of scalar information to attach to each point of the point cloud. .. container:: message-rst-vision-augmentedpointcloud3dfloat-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/vision/AugmentedPointCloud3DFloat.proto :lines: 15-72 :language: protobuf :emphasize-lines: 50-50,56-56 .. _message-rst-vision-augmentedpointcloud3dfloat-channel: Message Channel --------------- .. container:: message-rst-vision-augmentedpointcloud3dfloat-channel-multi .. container:: message-rst-vision-augmentedpointcloud3dfloat-channel-documentation .. py:class:: rst.vision.AugmentedPointCloud3DFloat.Channel One channel of color information attached to a set of 3D points. Each channel contains a vector of the same size as the original point cloud and attaches the value of one color channel to each point of the target point cloud. The following conventions for channel names and respective values exist: "r", "g", "b" RGB values represented between 0 and 1. "intensity" Grayscale image value. Between 0 and 1. "u", "v" Forms YUV color information in combination with an "intensity" channel. Between 0 and 1. Inspired by the design of the sensor_msgs/ChannelFloat32 ROS message type. .. py:attribute:: name :type: :py:class:`ASCII-STRING` The name of the color channel. .. py:attribute:: values :type: array of :py:class:`FLOAT32` **Constraint**: ``len(value) = len(.points.points)`` The actual values for the represented color channel for each point of the target point cloud. N-th value is associated to n-th point in :py:attr:`points `. .. container:: message-rst-vision-augmentedpointcloud3dfloat-channel-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/vision/AugmentedPointCloud3DFloat.proto :lines: 42-58 :language: protobuf :emphasize-lines: 6-6,15-15 .. _message-rst-vision-locatedxyzimage: Message LocatedXYZImage ----------------------- .. container:: message-rst-vision-locatedxyzimage-multi .. container:: message-rst-vision-locatedxyzimage-documentation .. py:class:: rst.vision.LocatedXYZImage A simple point cloud represented in 2D structure with information from where it was taken. By adding information about the pose of the camera and its perceived view frustum, one can reconstruct the location and the circumstances under which the provided point cloud was captured. .. codeauthor:: Leon Ziegler @create_collection .. py:attribute:: image :type: :py:class:`rst.vision.SimpleXYZImage` The background model. .. py:attribute:: camera :type: :py:class:`rst.geometry.CameraPose` The camera's pose in 3d space. .. py:attribute:: frustum :type: :py:class:`rst.geometry.ViewFrustum` The camera's view frustum. .. container:: message-rst-vision-locatedxyzimage-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/vision/LocatedXYZImage.proto :lines: 22-39 :language: protobuf :emphasize-lines: 6-6,11-11,16-16 .. _message-rst-vision-simplexyzimage: Message SimpleXYZImage ---------------------- .. container:: message-rst-vision-simplexyzimage-multi .. container:: message-rst-vision-simplexyzimage-documentation .. py:class:: rst.vision.SimpleXYZImage **Constraint**: ``.width * .height = len(.x)`` **Constraint**: ``.width * .height = len(.y)`` **Constraint**: ``.width * .height = len(.z)`` Saves 3D data (X, Y, Z values) which have a 2D ordering. This kind of depth-data is produced by e.g. Kinect or Swissranger cameras. :py:attr:`x `, :py:attr:`y `, :py:attr:`z ` are 1D arrays which save separately the X, Y, Z values of the 3D points. .. codeauthor:: Agnes Swadzba @create_collection .. py:attribute:: width :type: :py:class:`UINT32` **Constraint**: ``value > 0`` **Unit**: pixel Width of the underlying 2D ordering structure. .. py:attribute:: height :type: :py:class:`UINT32` **Constraint**: ``value > 0`` **Unit**: pixel Height of the underlying 2D ordering structure. .. py:attribute:: x :type: array of :py:class:`FLOAT32` The values are ordered by linearizing the underlying 2D structure row-wise. .. py:attribute:: y :type: array of :py:class:`FLOAT32` See :py:attr:`x `. .. py:attribute:: z :type: array of :py:class:`FLOAT32` See :py:attr:`x `. .. container:: message-rst-vision-simplexyzimage-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/vision/SimpleXYZImage.proto :lines: 22-54 :language: protobuf :emphasize-lines: 8-8,16-16,21-21,26-26,31-31 .. _message-rst-vision-laserscan: Message LaserScan ----------------- .. container:: message-rst-vision-laserscan-multi .. container:: message-rst-vision-laserscan-documentation .. py:class:: rst.vision.LaserScan An object of this type represents a single laser scan carried out by an appropriate planar laser range-finder. .. codeauthor:: Leon Ziegler @create_collection .. py:attribute:: scan_values :type: array of :py:class:`FLOAT32` **Unit**: meter A set of values coming from the laserscanning device. .. py:attribute:: scan_angle :type: :py:class:`FLOAT32` **Unit**: radian The angular range that is covered by the scan. This value depends on the used hardware and equals the sensor's one-dimensional field of view. The values from :py:attr:`scan_values ` are evenly distributed over this angular range. .. container:: message-rst-vision-laserscan-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/vision/LaserScan.proto :lines: 14-32 :language: protobuf :emphasize-lines: 7-7,17-17 .. _message-rst-vision-images: Message Images -------------- .. container:: message-rst-vision-images-multi .. container:: message-rst-vision-images-documentation .. py:class:: rst.vision.Images A collection of images. .. codeauthor:: Johannes Wienke .. py:attribute:: images :type: array of :py:class:`rst.vision.Image` The images contained in the collection. Order of elements does not matter. .. container:: message-rst-vision-images-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/vision/Images.proto :lines: 14-23 :language: protobuf :emphasize-lines: 8-8 .. _message-rst-vision-locatedface: Message LocatedFace ------------------- .. container:: message-rst-vision-locatedface-multi .. container:: message-rst-vision-locatedface-documentation .. py:class:: rst.vision.LocatedFace This type extends the regular Face type with a 3D location. .. codeauthor:: Leon Ziegler @create_collection .. py:attribute:: face :type: :py:class:`rst.vision.Face` The face as a part of an image. .. py:attribute:: location :type: :py:class:`rst.geometry.Translation` The 3d location of the face. .. py:attribute:: orientation :type: :py:class:`rst.geometry.Rotation` The 3d orientation of the face. The provided rotation should be passed as a relative rotation from the default pose when the person looks straight ahead. In this case the axes of the corresponding coordinate system are defined as follows: * x axis: points in the direction of the person's view * y axis: points to the person's right side * z axis: points downwards .. container:: message-rst-vision-locatedface-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/vision/LocatedFace.proto :lines: 17-40 :language: protobuf :emphasize-lines: 6-6,11-11,23-23 .. _message-rst-vision-face: Message Face ------------ .. container:: message-rst-vision-face-multi .. container:: message-rst-vision-face-documentation .. py:class:: rst.vision.Face An object of this type represents a human face detected in an image. The region of the image which corresponds to the face is represented as a :py:class:`BoundingBox ` . .. codeauthor:: Johannes Wienke .. py:attribute:: region :type: :py:class:`rst.geometry.BoundingBox` Bounding box defining the location of the detected face in a camera image. .. py:attribute:: confidence :type: :py:class:`FLOAT64` **Constraint**: ``0 <= value <= 1`` Indicates the confidence of the detector that this detection result is actually a real face. Higher values indicate a higher confidence. .. container:: message-rst-vision-face-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/vision/Face.proto :lines: 17-33 :language: protobuf :emphasize-lines: 7-7,15-15 .. _message-rst-vision-image: Message Image ------------- .. container:: message-rst-vision-image-multi .. container:: message-rst-vision-image-documentation .. py:class:: rst.vision.Image An uncompressed image with a certain pixel format, color and depth. The binary intensity data is contained in the :py:attr:`data ` field. The remaining fields contain information about the interpretation, that is dimensions (:py:attr:`width ` x :py:attr:`height `), color (:py:attr:`color_mode `, :py:attr:`channels `), depth (:py:attr:`depth `) and channel layout (:py:attr:`data_order `, :py:attr:`channels `), of that data. Suggested interpretation of RSB timestamps: create Image grab time .. todo:: to be more precisely defined. e.g. what does this mean for rolling shutter cameras? .. codeauthor:: Johannes Wienke .. py:attribute:: data :type: :py:class:`OCTET-VECTOR` **Constraint**: ``len(value) = (.width * .height * .channels * .depth) / 8`` Stores the actual pixel data of the image. The number of bytes and their interpretation depend on the values of the remaining fields. .. py:attribute:: width :type: :py:class:`UINT32` **Unit**: pixel The number of pixels in each row of the image. .. py:attribute:: height :type: :py:class:`UINT32` **Unit**: pixel The number of pixels in each column of the image. .. py:attribute:: channels :type: :py:class:`UINT32` **Unit**: number The number of color channels in the image. The interpretation of these channels depends on :py:attr:`color_mode `. .. py:attribute:: depth :type: :py:class:`rst.vision.Image.Depth` The number of bits used to encode .. py:attribute:: color_mode :type: :py:class:`rst.vision.Image.ColorMode` Colorspace and layout of the color channels of the image. Determines pixel layout in combination with :py:attr:`data_order `. .. py:attribute:: data_order :type: :py:class:`rst.vision.Image.DataOrder` Layout of the color planes of the image. Determines pixel layout in combination with :py:attr:`color_mode `. .. container:: message-rst-vision-image-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/vision/Image.proto :lines: 27-169 :language: protobuf :emphasize-lines: 101-101,107-107,113-113,122-122,127-127,134-134,141-141 .. _message-rst-vision-image-depth: Message Depth ------------- .. container:: message-rst-vision-image-depth-multi .. container:: message-rst-vision-image-depth-documentation .. py:class:: rst.vision.Image.Depth Depth of one color channel. Reflecting the definitions from OpenCV's IplImage. .. py:attribute:: DEPTH_8U = 8 *Not documented* .. py:attribute:: DEPTH_16U = 16 *Not documented* .. py:attribute:: DEPTH_32F = 32 *Not documented* .. container:: message-rst-vision-image-depth-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/vision/Image.proto :lines: 34-38 :language: protobuf :emphasize-lines: 2-2,3-3,4-4 .. _message-rst-vision-image-colormode: Message ColorMode ----------------- .. container:: message-rst-vision-image-colormode-multi .. container:: message-rst-vision-image-colormode-documentation .. py:class:: rst.vision.Image.ColorMode Colorspace(s) and layout of color channel(s). .. py:attribute:: COLOR_GRAYSCALE = 0 The image consists of only one channel containing intensity values. MUST be used with :py:attr:`channels ` = 1. .. py:attribute:: COLOR_RGB = 1 The image has three color channels containing the red, green and blue color components (note the order of the channels, not to be confused with :ref:`COLOR_BGR `). MUST be used with :py:attr:`channels ` = 3. .. py:attribute:: COLOR_BGR = 2 The image has three color channels containing the blue, green and red color components (note the order of the channels, not to be confused with :ref:`COLOR_RGB `). MUST be used with :py:attr:`channels ` = 3. .. py:attribute:: COLOR_YUV = 4 The image has three color channels, encoded in the YUV colorspace, and uses the YUVYUV pixel layout. MUST be used with :py:attr:`channels ` = 3. .. py:attribute:: COLOR_YUV422 = 8 The image has three color channels, encoded in the YUV colorspace, and uses the YUYV pixel layout. MUST be used with :py:attr:`channels ` = 3. .. container:: message-rst-vision-image-colormode-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/vision/Image.proto :lines: 43-87 :language: protobuf :emphasize-lines: 9-9,18-18,27-27,35-35,43-43 .. _message-rst-vision-image-dataorder: Message DataOrder ----------------- .. container:: message-rst-vision-image-dataorder-multi .. container:: message-rst-vision-image-dataorder-documentation .. py:class:: rst.vision.Image.DataOrder Describes storage layout of pixels with respect to channels. .. py:attribute:: DATA_SEPARATE = 0 Separate planes. Example for :ref:`COLOR_RGB `: .. parsed-literal:: R R R ... (:py:attr:`width ` x :py:attr:`height ` times) G G G ... (:py:attr:`width ` x :py:attr:`height ` times) B B B ... (:py:attr:`width ` x :py:attr:`height ` times) .. py:attribute:: DATA_INTERLEAVED = 1 Interleaved image. Example for :ref:`COLOR_RGB `: .. parsed-literal:: R G B R G B R G B ... (:py:attr:`width ` x :py:attr:`height ` times) .. container:: message-rst-vision-image-dataorder-source :download:`Download this file ` .. literalinclude:: //home/jenkins/workspace/rst-manual-0.15-merge-simulator/upstream/RST-0.15.0-Linux/share/rst0.15/proto/stable/rst/vision/Image.proto :lines: 92-118 :language: protobuf :emphasize-lines: 14-14,25-25