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 (Image
) or things which can be recognized in images
(e.g. Face
).
See also
- Wikipedia article containing the definition above
- http://en.wikipedia.org/wiki/Image_processing
Messages¶
- FaceWithGazeCollection
- SimpleXYZImageCollection
- EncodedImageCollection
- LocatedXYZImageCollection
- FaceLandmarksCollection
- LaserScanCollection
- LocatedFaceCollection
- Faces
- AugmentedPointCloudSet3DFloat
- AugmentedPointCloud3DFloat
- FaceWithGaze
- EncodedImage
- LocatedXYZImage
- SimpleXYZImage
- FaceLandmarks
- LaserScan
- Images
- LocatedFace
- Face
- Image
Message FaceWithGazeCollection¶
-
class
rst.vision.
FaceWithGazeCollection
¶ Collection of
FaceWithGaze
instances.Auto-generated.
-
element
¶ Type: array of rst.vision.FaceWithGaze
The individual elements of the collection.
Constraints regarding the empty collection, sorting, duplicated entries etc. are use case specific.
-
message FaceWithGazeCollection {
/**
* The individual elements of the collection.
*
* Constraints regarding the empty collection, sorting, duplicated
* entries etc. are use case specific.
*/
repeated FaceWithGaze element = 1;
}
Message SimpleXYZImageCollection¶
-
class
rst.vision.
SimpleXYZImageCollection
¶ Collection of
SimpleXYZImage
instances.Auto-generated.
-
element
¶ Type: array of rst.vision.SimpleXYZImage
The individual elements of the collection.
Constraints regarding the empty collection, sorting, duplicated entries etc. are use case specific.
-
message SimpleXYZImageCollection {
/**
* The individual elements of the collection.
*
* Constraints regarding the empty collection, sorting, duplicated
* entries etc. are use case specific.
*/
repeated SimpleXYZImage element = 1;
}
Message EncodedImageCollection¶
-
class
rst.vision.
EncodedImageCollection
¶ Collection of
EncodedImage
instances.Auto-generated.
-
element
¶ Type: array of rst.vision.EncodedImage
The individual elements of the collection.
Constraints regarding the empty collection, sorting, duplicated entries etc. are use case specific.
-
message EncodedImageCollection {
/**
* The individual elements of the collection.
*
* Constraints regarding the empty collection, sorting, duplicated
* entries etc. are use case specific.
*/
repeated EncodedImage element = 1;
}
Message LocatedXYZImageCollection¶
-
class
rst.vision.
LocatedXYZImageCollection
¶ Collection of
LocatedXYZImage
instances.Auto-generated.
-
element
¶ Type: array of rst.vision.LocatedXYZImage
The individual elements of the collection.
Constraints regarding the empty collection, sorting, duplicated entries etc. are use case specific.
-
message LocatedXYZImageCollection {
/**
* The individual elements of the collection.
*
* Constraints regarding the empty collection, sorting, duplicated
* entries etc. are use case specific.
*/
repeated LocatedXYZImage element = 1;
}
Message FaceLandmarksCollection¶
-
class
rst.vision.
FaceLandmarksCollection
¶ Collection of
FaceLandmarks
instances.Auto-generated.
-
element
¶ Type: array of rst.vision.FaceLandmarks
The individual elements of the collection.
Constraints regarding the empty collection, sorting, duplicated entries etc. are use case specific.
-
message FaceLandmarksCollection {
/**
* The individual elements of the collection.
*
* Constraints regarding the empty collection, sorting, duplicated
* entries etc. are use case specific.
*/
repeated FaceLandmarks element = 1;
}
Message LaserScanCollection¶
-
class
rst.vision.
LaserScanCollection
¶ Collection of
LaserScan
instances.Auto-generated.
-
element
¶ Type: array of rst.vision.LaserScan
The individual elements of the collection.
Constraints regarding the empty collection, sorting, duplicated entries etc. are use case specific.
-
message LaserScanCollection {
/**
* The individual elements of the collection.
*
* Constraints regarding the empty collection, sorting, duplicated
* entries etc. are use case specific.
*/
repeated LaserScan element = 1;
}
Message LocatedFaceCollection¶
-
class
rst.vision.
LocatedFaceCollection
¶ Collection of
LocatedFace
instances.Auto-generated.
-
element
¶ Type: array of rst.vision.LocatedFace
The individual elements of the collection.
Constraints regarding the empty collection, sorting, duplicated entries etc. are use case specific.
-
message LocatedFaceCollection {
/**
* The individual elements of the collection.
*
* Constraints regarding the empty collection, sorting, duplicated
* entries etc. are use case specific.
*/
repeated LocatedFace element = 1;
}
Message Faces¶
-
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.
Code author: Sebastian Wrede <swrede@techfak.uni-bielefeld.de>
-
faces
¶ Type: array of rst.vision.Face
List of faces.
-
width
¶ Type: UINT32
Unit: pixel
Width of the source image.
-
height
¶ Type: UINT32
Unit: pixel
Height of the source image.
-
message Faces {
/**
* List of faces.
*/
repeated Face faces = 1;
/**
* Width of the source image.
*/
// @unit(pixel)
required uint32 width = 2;
/**
* Height of the source image.
*/
// @unit(pixel)
required uint32 height = 3;
}
Message AugmentedPointCloudSet3DFloat¶
-
class
rst.vision.
AugmentedPointCloudSet3DFloat
¶ A set of augmented 3D Point clouds.
Code author: Jan Moringen <jmoringe@techfak.uni-bielefeld.de>
-
clouds
¶ Type: array of rst.vision.AugmentedPointCloud3DFloat
Empty collection of clouds is allowed. The order of cloud objects is not significant.
-
message AugmentedPointCloudSet3DFloat {
/**
* Empty collection of clouds is allowed.
* The order of cloud objects is not significant.
*/
repeated AugmentedPointCloud3DFloat clouds = 1;
}
Message AugmentedPointCloud3DFloat¶
-
class
rst.vision.
AugmentedPointCloud3DFloat
¶ Associates a set of scalar values (such as color information) to each point of a point cloud.
Code author: Johannes Wienke <jwienke@techfak.uni-bielefeld.de>
-
points
¶ Type: rst.geometry.PointCloud3DFloat
Geometry of the point cloud augmented by the data in
channels
.
-
channels
¶ Type: array of rst.vision.AugmentedPointCloud3DFloat.Channel
An optional set of scalar information to attach to each point of the point cloud.
-
message AugmentedPointCloud3DFloat {
/**
* 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.
*/
message Channel {
/**
* The name of the color channel.
*/
required string name = 1;
/**
* 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 @ref .points.
*/
// @constraint(len(value) = len(.points.points))
repeated float values = 2 [packed = true];
}
/**
* Geometry of the point cloud augmented by the data in @ref
* .channels.
*/
required .rst.geometry.PointCloud3DFloat points = 1;
/**
* An optional set of scalar information to attach to each point
* of the point cloud.
*/
repeated Channel channels = 2;
}
Message Channel¶
-
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.
-
name
¶ Type: ASCII-STRING
The name of the color channel.
-
message Channel {
/**
* The name of the color channel.
*/
required string name = 1;
/**
* 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 @ref .points.
*/
// @constraint(len(value) = len(.points.points))
repeated float values = 2 [packed = true];
}
Message FaceWithGaze¶
-
class
rst.vision.
FaceWithGaze
¶ An object of this type represents a human face detected in an image including gaze informations.
Code author: Birte Carlmeyer <bcarlmey@techfak.uni-bielefeld.de>
@create_collection
-
region
¶ Type: rst.vision.Face
The region of the image which corresponds to the face.
-
lid_closed
¶ Type: BOOL
If this is true, the eyelids are closed.
-
horizontal_gaze_estimation
¶ Type: FLOAT64
Unit: radian
Horizontal gaze estimation angle. A relative rotation from the default gaze when the person looks straight into the camera. Positive values means that the person is looking upwards and negative value means that the person is looking downwards.
-
vertical_gaze_estimation
¶ Type: FLOAT64
Unit: radian
Vertical gaze estimation angle. A relative rotation from the default gaze when the person looks straight into the camera. Positive values means that the person is looking to the right and negative values means that the person is looking to the left (from the persons point of view).
-
message FaceWithGaze {
/**
* The region of the image which corresponds to the face.
*/
required Face region = 1;
/**
* If this is true, the eyelids are closed.
*/
optional bool lid_closed = 2;
/**
* Horizontal gaze estimation angle. A relative rotation from the
* default gaze when the person looks straight into the camera.
* Positive values means that the person is looking upwards and
* negative value means that the person is looking downwards.
*/
// @unit(radian)
optional double horizontal_gaze_estimation = 3;
/**
* Vertical gaze estimation angle. A relative rotation from the
* default gaze when the person looks straight into the camera.
* Positive values means that the person is looking to the right and
* negative values means that the person is looking to the left
* (from the persons point of view).
*/
// @unit(radian)
optional double vertical_gaze_estimation = 4;
}
Message EncodedImage¶
-
class
rst.vision.
EncodedImage
¶ An image encoded in a certain format.
Code author: Viktor Richter <vrichter@techfak.uni-bielefeld.de>
@create_collection
-
encoding
¶ Type: rst.vision.EncodedImage.Encoding
The encoding used to encode an image into binary data.
-
data
¶ Type: OCTET-VECTOR
Holds the binary image data.
Can be decoded using the provided encoding information.
-
message EncodedImage {
/**
* Identifies an image/file encoding format.
*/
enum Encoding {
/**
* Portable Pixmap Format.
*
* An open uncompressed image file format.
* @see https://en.wikipedia.org/wiki/Netpbm_format
*/
PPM = 1;
/**
* Portable Network Graphics format (ISO/IEC 15948).
*
* An open lossless compressed image file format.
* @see https://en.wikipedia.org/wiki/Portable_Network_Graphics
*/
PNG = 2;
/**
* Also known as JPEG (ISO/IEC 10918).
*
* An image file format with adjustable lossy compression
* created by the Joint Photographic Experts Group. The
* compression is based on the discrete cosine transform.
* @see https://en.wikipedia.org/wiki/JPEG
*/
JPG = 3;
/**
* Also known as JPEG2000 (ISO/IEC 15444).
*
* An image file format with adjustable lossy compression
* created by the Joint Photographic Experts Group. This
* format superseeds JPG and can use discrete cosine transform
* or wavelet based methods for compression.
* @see https://en.wikipedia.org/wiki/JPEG_2000
*/
JP2 = 4;
/**
* Tagged Image File Format.
*
* A computer file format for raster graphics developed by
* adobe.
* @see https://en.wikipedia.org/wiki/Tagged_Image_File_Format
*/
TIFF = 5;
}
/**
* The encoding used to encode an image into binary data.
*/
required Encoding encoding = 2;
/**
* Holds the binary image data.
*
* Can be decoded using the provided encoding information.
*/
required bytes data = 1;
}
Message Encoding¶
-
class
rst.vision.EncodedImage.
Encoding
¶ Identifies an image/file encoding format.
-
PPM
¶ -
= 1
Portable Pixmap Format.
An open uncompressed image file format.
See also
-
PNG
¶ -
= 2
Portable Network Graphics format (ISO/IEC 15948).
An open lossless compressed image file format.
-
JPG
¶ -
= 3
Also known as JPEG (ISO/IEC 10918).
An image file format with adjustable lossy compression created by the Joint Photographic Experts Group. The compression is based on the discrete cosine transform.
See also
-
JP2
¶ -
= 4
Also known as JPEG2000 (ISO/IEC 15444).
An image file format with adjustable lossy compression created by the Joint Photographic Experts Group. This format superseeds JPG and can use discrete cosine transform or wavelet based methods for compression.
See also
-
TIFF
¶ -
= 5
Tagged Image File Format.
A computer file format for raster graphics developed by adobe.
-
enum Encoding {
/**
* Portable Pixmap Format.
*
* An open uncompressed image file format.
* @see https://en.wikipedia.org/wiki/Netpbm_format
*/
PPM = 1;
/**
* Portable Network Graphics format (ISO/IEC 15948).
*
* An open lossless compressed image file format.
* @see https://en.wikipedia.org/wiki/Portable_Network_Graphics
*/
PNG = 2;
/**
* Also known as JPEG (ISO/IEC 10918).
*
* An image file format with adjustable lossy compression
* created by the Joint Photographic Experts Group. The
* compression is based on the discrete cosine transform.
* @see https://en.wikipedia.org/wiki/JPEG
*/
JPG = 3;
/**
* Also known as JPEG2000 (ISO/IEC 15444).
*
* An image file format with adjustable lossy compression
* created by the Joint Photographic Experts Group. This
* format superseeds JPG and can use discrete cosine transform
* or wavelet based methods for compression.
* @see https://en.wikipedia.org/wiki/JPEG_2000
*/
JP2 = 4;
/**
* Tagged Image File Format.
*
* A computer file format for raster graphics developed by
* adobe.
* @see https://en.wikipedia.org/wiki/Tagged_Image_File_Format
*/
TIFF = 5;
}
Message LocatedXYZImage¶
-
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.
Code author: Leon Ziegler <lziegler@techfak.uni-bielefeld.de>
@create_collection
-
image
¶ Type: rst.vision.SimpleXYZImage
The background model.
-
camera
¶ Type: rst.geometry.CameraPose
The camera’s pose in 3d space.
-
frustum
¶ Type: rst.geometry.ViewFrustum
The camera’s view frustum.
-
message LocatedXYZImage {
/**
* The background model.
*/
required vision.SimpleXYZImage image = 1;
/**
* The camera's pose in 3d space.
*/
required geometry.CameraPose camera = 2;
/**
* The camera's view frustum.
*/
required geometry.ViewFrustum frustum = 3;
}
Message SimpleXYZImage¶
-
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.
x
,y
,z
are 1D arrays which save separately the X, Y, Z values of the 3D points.Code author: Agnes Swadzba <aswadzba@techfak.uni-bielefeld.de>
@create_collection
-
width
¶ Type: UINT32
Constraint:
value > 0
Unit: pixel
Width of the underlying 2D ordering structure.
-
height
¶ Type: UINT32
Constraint:
value > 0
Unit: pixel
Height of the underlying 2D ordering structure.
-
x
¶ Type: array of FLOAT32
The values are ordered by linearizing the underlying 2D structure row-wise.
-
message SimpleXYZImage {
/**
* Width of the underlying 2D ordering structure.
*/
// @constraint(value > 0)
// @unit(pixel)
required uint32 width = 1;
/**
* Height of the underlying 2D ordering structure.
*/
// @constraint(value > 0)
// @unit(pixel)
required uint32 height = 2;
/**
* The values are ordered by linearizing the underlying 2D structure row-wise.
*/
repeated float x = 3;
/**
* See @ref .x.
*/
repeated float y = 4;
/**
* See @ref .x.
*/
repeated float z = 5;
};
Message FaceLandmarks¶
-
class
rst.vision.
FaceLandmarks
¶ FaceLandmarks represent the result of an 68 point face landmark detection.
For example images see: http://ibug.doc.ic.ac.uk/resources/facial-point-annotations/
For readability the 68 face landmarks are split into points of different face parts. The point order is preserved.
Code author: Viktor Richter <vrichter@techfak.uni-bielefeld.de>
@create_collection
-
jaw
¶ Type: array of rst.math.Vec2DInt
Constraint:
len(value) == 17
17 Points of the jaw.
jaw[0] = top-left point of the face jaw[8] = the center of the chin jaw[16] = top-right point of the face
-
nose
¶ Type: array of rst.math.Vec2DInt
Constraint:
len(value) == 4
4 Points of the nasal bridge.
nose[0] = top-point of the nasal bridge nose[3] = bottom-point of the nasal bridge (tip of the nose)
-
nose_wings
¶ Type: array of rst.math.Vec2DInt
Constraint:
len(value) == 5
5 Points of the nose wings.
nose_wings[0] = left end of the lower nasal edge nose_wings[2] = the center of the lower nasal edge nose_wings[4] = right end of the lower nasal edge
-
right_brow
¶ Type: array of rst.math.Vec2DInt
Constraint:
len(value) == 5
5 Points of the rigt brow.
right_brow[0] = left end of the right brow right_brow[4] = right end of the right brow
-
left_brow
¶ Type: array of rst.math.Vec2DInt
Constraint:
len(value) == 5
5 Points of the left brow.
left_brow[0] = left end of the left brow left_brow[4] = right end of the left brow
-
right_eye
¶ Type: array of rst.math.Vec2DInt
Constraint:
len(value) == 6
6 Points of the border of the right eye.
right_eye[0] = left peak of the right eye … = right upper eye-lid right_eye[3] = right peak of the right eye … = right lower eye-lid
-
left_eye
¶ Type: array of rst.math.Vec2DInt
Constraint:
len(value) == 6
6 Points of the border of the left eye.
right_eye[0] = left peak of the left eye … = left upper eye-lid right_eye[3] = right peak of the left eye … = left lower eye-lid
-
outer_lips
¶ Type: array of rst.math.Vec2DInt
Constraint:
len(value) == 12
12 Points of the outer border of the lips.
outer_lips[0] = left corner of the outer lips … = left upper edge outer_lips[3] = center of the upper lip … = right upper edge outer_lips[6] = right corner of the outer lips … = right lower edge outer_lips[9] = center of the lower lip … = left lower edge
-
inner_lips
¶ Type: array of rst.math.Vec2DInt
Constraint:
len(value) == 8
8 Points of the inner border of the lips.
inner_lips[0] = left corner of the inner lips inner_lips[2] = center of the upper lip inner_lips[4] = right corner of the inner lips inner_lips[6] = center of the lower lip
-
message FaceLandmarks {
/**
* 17 Points of the jaw.
*
* jaw[0] = top-left point of the face
* jaw[8] = the center of the chin
* jaw[16] = top-right point of the face
*/
// @constraint(len(value) == 17)
repeated .rst.math.Vec2DInt jaw = 1;
/**
* 4 Points of the nasal bridge.
*
* nose[0] = top-point of the nasal bridge
* nose[3] = bottom-point of the nasal bridge (tip of the nose)
*/
// @constraint(len(value) == 4)
repeated .rst.math.Vec2DInt nose = 2;
/**
* 5 Points of the nose wings.
*
* nose_wings[0] = left end of the lower nasal edge
* nose_wings[2] = the center of the lower nasal edge
* nose_wings[4] = right end of the lower nasal edge
*/
// @constraint(len(value) == 5)
repeated .rst.math.Vec2DInt nose_wings = 3;
/**
* 5 Points of the rigt brow.
*
* right_brow[0] = left end of the right brow
* right_brow[4] = right end of the right brow
*/
// @constraint(len(value) == 5)
repeated .rst.math.Vec2DInt right_brow = 4;
/**
* 5 Points of the left brow.
*
* left_brow[0] = left end of the left brow
* left_brow[4] = right end of the left brow
*/
// @constraint(len(value) == 5)
repeated .rst.math.Vec2DInt left_brow = 5;
/**
* 6 Points of the border of the right eye.
*
* right_eye[0] = left peak of the right eye
* ... = right upper eye-lid
* right_eye[3] = right peak of the right eye
* ... = right lower eye-lid
*/
// @constraint(len(value) == 6)
repeated .rst.math.Vec2DInt right_eye = 6;
/**
* 6 Points of the border of the left eye.
*
* right_eye[0] = left peak of the left eye
* ... = left upper eye-lid
* right_eye[3] = right peak of the left eye
* ... = left lower eye-lid
*/
// @constraint(len(value) == 6)
repeated .rst.math.Vec2DInt left_eye = 7;
/**
* 12 Points of the outer border of the lips.
*
* outer_lips[0] = left corner of the outer lips
* ... = left upper edge
* outer_lips[3] = center of the upper lip
* ... = right upper edge
* outer_lips[6] = right corner of the outer lips
* ... = right lower edge
* outer_lips[9] = center of the lower lip
* ... = left lower edge
*/
// @constraint(len(value) == 12)
repeated .rst.math.Vec2DInt outer_lips = 8;
/**
* 8 Points of the inner border of the lips.
*
* inner_lips[0] = left corner of the inner lips
* inner_lips[2] = center of the upper lip
* inner_lips[4] = right corner of the inner lips
* inner_lips[6] = center of the lower lip
*/
// @constraint(len(value) == 8)
repeated .rst.math.Vec2DInt inner_lips = 9;
}
Message LaserScan¶
-
class
rst.vision.
LaserScan
¶ An object of this type represents a single laser scan carried out by an appropriate planar laser range-finder.
Code author: Leon Ziegler <lziegler@techfak.uni-bielefeld.de>
@create_collection
-
scan_values
¶ Type: array of FLOAT32
Unit: meter
A set of values coming from the laserscanning device.
-
scan_angle
¶ Type: 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
scan_values
are evenly distributed over this angular range.
-
message LaserScan {
/**
* A set of values coming from the laserscanning device.
*/
// @unit(meter)
repeated float scan_values = 1;
/**
* 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 @ref
* .scan_values are evenly distributed over this angular range.
*/
// @unit(radian)
required float scan_angle = 2;
}
Message Images¶
-
class
rst.vision.
Images
¶ A collection of images.
Code author: Johannes Wienke <jwienke@techfak.uni-bielefeld.de>
-
images
¶ Type: array of rst.vision.Image
The images contained in the collection.
Order of elements does not matter.
-
message Images {
/**
* The images contained in the collection.
*
* Order of elements does not matter.
*/
repeated Image images = 1;
}
Message LocatedFace¶
-
class
rst.vision.
LocatedFace
¶ This type extends the regular Face type with a 3D location.
Code author: Leon Ziegler <lziegler@techfak.uni-bielefeld.de>
@create_collection
-
face
¶ Type: rst.vision.Face
The face as a part of an image.
-
location
¶ Type: rst.geometry.Translation
The 3d location of the face.
-
orientation
¶ Type: 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
-
message LocatedFace {
/**
* The face as a part of an image.
*/
required vision.Face face = 1;
/**
* The 3d location of the face.
*/
optional geometry.Translation location = 2;
/**
* 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
*/
optional geometry.Rotation orientation = 3;
}
Message Face¶
-
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
BoundingBox
.Code author: Johannes Wienke <jwienke@techfak.uni-bielefeld.de>
-
region
¶ Type: rst.geometry.BoundingBox
Bounding box defining the location of the detected face in a camera image.
-
confidence
¶ Type: 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.
-
message Face {
/**
* Bounding box defining the location of the detected face in a
* camera image.
*/
required geometry.BoundingBox region = 1;
/**
* Indicates the confidence of the detector that this detection
* result is actually a real face. Higher values indicate a higher
* confidence.
*/
// @constraint(0 <= value <= 1)
optional double confidence = 2;
}
Message Image¶
-
class
rst.vision.
Image
¶ An uncompressed image with a certain pixel format, color and depth.
The binary intensity data is contained in the
data
field. The remaining fields contain information about the interpretation, that is dimensions (width
xheight
), color (color_mode
,channels
), depth (depth
) and channel layout (data_order
,channels
), of that data.Suggested interpretation of RSB timestamps:
create
Image grab timeTodo
- to be more precisely defined. e.g. what does this mean
- for rolling shutter cameras?
Code author: Johannes Wienke <jwienke@techfak.uni-bielefeld.de>
-
data
¶ Type: 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.
-
width
¶ Type: UINT32
Unit: pixel
The number of pixels in each row of the image.
-
height
¶ Type: UINT32
Unit: pixel
The number of pixels in each column of the image.
-
channels
¶ Type: UINT32
Unit: number
The number of color channels in the image.
The interpretation of these channels depends on
color_mode
.
-
depth
¶ Type: rst.vision.Image.Depth
The number of bits used to encode
-
color_mode
¶ Type: rst.vision.Image.ColorMode
Colorspace and layout of the color channels of the image.
Determines pixel layout in combination with
data_order
.
-
data_order
¶ Type: rst.vision.Image.DataOrder
Layout of the color planes of the image.
Determines pixel layout in combination with
color_mode
.
message Image {
/**
* Depth of one color channel.
*
* Reflecting the definitions from OpenCV's IplImage.
*/
enum Depth {
DEPTH_8U = 8;
DEPTH_16U = 16;
DEPTH_32F = 32;
}
/**
* Colorspace(s) and layout of color channel(s).
*/
enum ColorMode {
/**
* The image consists of only one channel containing intensity
* values.
*
* MUST be used with @ref .channels = 1.
*/
COLOR_GRAYSCALE = 0;
/**
* 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 @ref .channels = 3.
*/
COLOR_RGB = 1;
/**
* 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 @ref .channels = 3.
*/
COLOR_BGR = 2;
/**
* The image has three color channels, encoded in the YUV
* colorspace, and uses the YUVYUV pixel layout.
*
* MUST be used with @ref .channels = 3.
*/
COLOR_YUV = 4;
/**
* The image has three color channels, encoded in the YUV
* colorspace, and uses the YUYV pixel layout.
*
* MUST be used with @ref .channels = 3.
*/
COLOR_YUV422 = 8;
}
/**
* Describes storage layout of pixels with respect to channels.
*/
enum DataOrder {
/**
* Separate planes.
*
* Example for @ref .ColorMode.COLOR_RGB:
*
* .. parsed-literal::
*
* R R R ... (@ref .width x @ref .height times)
* G G G ... (@ref .width x @ref .height times)
* B B B ... (@ref .width x @ref .height times)
*/
DATA_SEPARATE = 0;
/**
* Interleaved image.
*
* Example for @ref .ColorMode.COLOR_RGB:
*
* .. parsed-literal::
*
* R G B R G B R G B ... (@ref .width x @ref .height times)
*/
DATA_INTERLEAVED = 1;
}
/**
* Stores the actual pixel data of the image.
*
* The number of bytes and their interpretation depend on the
* values of the remaining fields.
*/
// @constraint(len(value) = (.width * .height * .channels * .depth) / 8)
required bytes data = 1;
/**
* The number of pixels in each row of the image.
*/
// @unit(pixel)
required uint32 width = 2;
/**
* The number of pixels in each column of the image.
*/
// @unit(pixel)
required uint32 height = 3;
/**
* The number of color channels in the image.
*
* The interpretation of these channels depends on @ref
* .color_mode.
*/
// @unit(number)
optional uint32 channels = 4 [default = 3];
/**
* The number of bits used to encode
*/
optional Depth depth = 5 [default = DEPTH_8U];
/**
* Colorspace and layout of the color channels of the image.
*
* Determines pixel layout in combination with @ref .data_order.
*/
optional ColorMode color_mode = 6 [default = COLOR_RGB];
/**
* Layout of the color planes of the image.
*
* Determines pixel layout in combination with @ref .color_mode.
*/
optional DataOrder data_order = 7 [default = DATA_SEPARATE];
}
Message Depth¶
enum Depth {
DEPTH_8U = 8;
DEPTH_16U = 16;
DEPTH_32F = 32;
}
Message ColorMode¶
-
class
rst.vision.Image.
ColorMode
¶ Colorspace(s) and layout of color channel(s).
-
COLOR_GRAYSCALE
¶ -
= 0
The image consists of only one channel containing intensity values.
MUST be used with
channels
= 1.
-
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 COLOR_BGR).
MUST be used with
channels
= 3.
-
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 COLOR_RGB).
MUST be used with
channels
= 3.
-
enum ColorMode {
/**
* The image consists of only one channel containing intensity
* values.
*
* MUST be used with @ref .channels = 1.
*/
COLOR_GRAYSCALE = 0;
/**
* 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 @ref .channels = 3.
*/
COLOR_RGB = 1;
/**
* 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 @ref .channels = 3.
*/
COLOR_BGR = 2;
/**
* The image has three color channels, encoded in the YUV
* colorspace, and uses the YUVYUV pixel layout.
*
* MUST be used with @ref .channels = 3.
*/
COLOR_YUV = 4;
/**
* The image has three color channels, encoded in the YUV
* colorspace, and uses the YUYV pixel layout.
*
* MUST be used with @ref .channels = 3.
*/
COLOR_YUV422 = 8;
}
Message DataOrder¶
enum DataOrder {
/**
* Separate planes.
*
* Example for @ref .ColorMode.COLOR_RGB:
*
* .. parsed-literal::
*
* R R R ... (@ref .width x @ref .height times)
* G G G ... (@ref .width x @ref .height times)
* B B B ... (@ref .width x @ref .height times)
*/
DATA_SEPARATE = 0;
/**
* Interleaved image.
*
* Example for @ref .ColorMode.COLOR_RGB:
*
* .. parsed-literal::
*
* R G B R G B R G B ... (@ref .width x @ref .height times)
*/
DATA_INTERLEAVED = 1;
}