Class RegionOfInterestMsg
ROS sensor_msgs/RegionOfInterest message.
Implements
Inherited Members
Namespace: Unity.SimulationPro.Foundation.SensorMessages
Assembly: Unity.SimulationPro.Foundation.dll
Syntax
[Serializable]
public class RegionOfInterestMsg : IMessage
Constructors
RegionOfInterestMsg()
Initializes a new instance with default values.
Declaration
public RegionOfInterestMsg()
RegionOfInterestMsg(uint, uint, uint, uint, bool)
Initializes a new instance with default values.
Declaration
public RegionOfInterestMsg(uint x_offset, uint y_offset, uint height, uint width, bool do_rectify)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | x_offset | Horizontal pixel offset of the region of interest. |
| uint | y_offset | Vertical pixel offset of the region of interest. |
| uint | height | Image height in pixels. |
| uint | width | Image width in pixels. |
| bool | do_rectify | Whether rectification should be applied. |
Fields
do_rectify
Width of ROI True if a distinct rectified ROI should be calculated from the "raw" ROI in this message. Typically this should be False if the full image is captured (ROI not used), and True if a subwindow is captured (ROI used).
Declaration
public bool do_rectify
Field Value
| Type | Description |
|---|---|
| bool |
height
Topmost pixel of the ROI (0 if the ROI includes the top edge of the image)
Declaration
public uint height
Field Value
| Type | Description |
|---|---|
| uint |
k_MessageTypeId
Identifier for this message type.
Declaration
public static readonly MessageTypeId k_MessageTypeId
Field Value
| Type | Description |
|---|---|
| MessageTypeId |
k_MessageTypeName
The ROS message type name string used for serialization and topic matching.
Declaration
public const string k_MessageTypeName = "sensor_msgs/RegionOfInterest"
Field Value
| Type | Description |
|---|---|
| string |
width
Height of ROI
Declaration
public uint width
Field Value
| Type | Description |
|---|---|
| uint |
x_offset
This message is used to specify a region of interest within an image. When used to specify the ROI setting of the camera when the image was taken, the height and width fields should either match the height and width fields for the associated image; or height = width = 0 indicates that the full resolution image was captured.
Declaration
public uint x_offset
Field Value
| Type | Description |
|---|---|
| uint |
y_offset
Leftmost pixel of the ROI (0 if the ROI includes the left edge of the image)
Declaration
public uint y_offset
Field Value
| Type | Description |
|---|---|
| uint |
Properties
MessageTypeId
Gets the unique runtime identifier for this message type.
Declaration
public MessageTypeId MessageTypeId { get; }
Property Value
| Type | Description |
|---|---|
| MessageTypeId |
MessageTypeName
Gets the ROS message type name for this message.
Declaration
public string MessageTypeName { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
Deserialize(IMessageDeserializer)
Deserializes a RegionOfInterestMsg from the given deserializer.
Declaration
public static RegionOfInterestMsg Deserialize(IMessageDeserializer deserializer)
Parameters
| Type | Name | Description |
|---|---|---|
| IMessageDeserializer | deserializer | The deserializer. |
Returns
| Type | Description |
|---|---|
| RegionOfInterestMsg | A new RegionOfInterestMsg instance. |
Register()
Registers this message type with the MessageTypeRegistry.
Declaration
[InitializeOnLoadMethod]
public static void Register()
ToString()
Returns a human-readable string representation of this message.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | A string representation of this instance. |
Overrides
WriteTo(IMessageSerializer)
Serializes this message to the given serializer.
Declaration
public void WriteTo(IMessageSerializer serializer)
Parameters
| Type | Name | Description |
|---|---|---|
| IMessageSerializer | serializer | The serializer. |