docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class DisparityImageMsg

    ROS stereo_msgs/DisparityImage message.

    Inheritance
    object
    DisparityImageMsg
    Implements
    IMessage
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Unity.SimulationPro.Foundation.Stereo
    Assembly: Unity.SimulationPro.Foundation.dll
    Syntax
    [Serializable]
    public class DisparityImageMsg : IMessage

    Constructors

    DisparityImageMsg()

    Initializes a new instance with default values.

    Declaration
    public DisparityImageMsg()

    DisparityImageMsg(HeaderMsg, ImageMsg, float, float, RegionOfInterestMsg, float, float, float)

    Initializes a new instance with default values.

    Declaration
    public DisparityImageMsg(HeaderMsg header, ImageMsg image, float f, float T, RegionOfInterestMsg valid_window, float min_disparity, float max_disparity, float delta_d)
    Parameters
    Type Name Description
    HeaderMsg header

    ROS message header containing timestamp and coordinate frame identifier.

    ImageMsg image

    The image data.

    float f

    Scalar factor.

    float T

    Interpolation factor, typically in the range [0, 1].

    RegionOfInterestMsg valid_window

    Sub-region of the image with valid disparity values.

    float min_disparity

    Minimum disparity value in pixels.

    float max_disparity

    Maximum disparity value in pixels.

    float delta_d

    Disparity step size in pixels.

    Fields

    delta_d

    Smallest allowed disparity increment. The smallest achievable depth range resolution is delta_Z = (Z^2/fT)*delta_d.

    Declaration
    public float delta_d
    Field Value
    Type Description
    float

    f

    Stereo geometry. For disparity d, the depth from the camera is Z = fT/d.

    Declaration
    public float f
    Field Value
    Type Description
    float

    header

    Separate header for compatibility with current TimeSynchronizer. Likely to be removed in a later release, use image.header instead.

    Declaration
    public HeaderMsg header
    Field Value
    Type Description
    HeaderMsg

    image

    Floating point disparity image. The disparities are pre-adjusted for any x-offset between the principal points of the two cameras (in the case that they are verged). That is: d = x_l - x_r - (cx_l - cx_r)

    Declaration
    public ImageMsg image
    Field Value
    Type Description
    ImageMsg

    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 = "stereo_msgs/DisparityImage"
    Field Value
    Type Description
    string

    max_disparity

    Max disparity field.

    Declaration
    public float max_disparity
    Field Value
    Type Description
    float

    min_disparity

    The range of disparities searched. In the disparity image, any disparity less than min_disparity is invalid. The disparity search range defines the horopter, or 3D volume that the stereo algorithm can "see". Points with Z outside of: Z_min = fT / max_disparity Z_max = fT / min_disparity could not be found.

    Declaration
    public float min_disparity
    Field Value
    Type Description
    float

    t

    T field.

    Declaration
    public float t
    Field Value
    Type Description
    float

    valid_window

    Baseline, world units Subwindow of (potentially) valid disparity values.

    Declaration
    public RegionOfInterestMsg valid_window
    Field Value
    Type Description
    RegionOfInterestMsg

    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

    T

    T field.

    Declaration
    public float T { get; set; }
    Property Value
    Type Description
    float

    Methods

    Deserialize(IMessageDeserializer)

    Deserializes a DisparityImageMsg from the given deserializer.

    Declaration
    public static DisparityImageMsg Deserialize(IMessageDeserializer deserializer)
    Parameters
    Type Name Description
    IMessageDeserializer deserializer

    The deserializer.

    Returns
    Type Description
    DisparityImageMsg

    A new DisparityImageMsg 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
    object.ToString()

    WriteTo(IMessageSerializer)

    Serializes this message to the given serializer.

    Declaration
    public void WriteTo(IMessageSerializer serializer)
    Parameters
    Type Name Description
    IMessageSerializer serializer

    The serializer.

    Implements

    IMessage
    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)