Main Content

sim3d.sensors.FisheyeCamera

Implement fisheye camera model

Since R2024b

    Description

    Use the sim3d.sensors.FisheyeCamera object to create a camera with a fisheye lens in the 3D environment. The sensor is based on the fisheye camera model proposed by Scaramuzza [1]. This camera object supports a field of view of up to 195 degrees. After you create a sim3d.sensors.FisheyeCamera object, you can modify aspects of the actor object by setting property values.

    Creation

    Description

    fisheyeCamera = sim3d.sensors.FisheyeCamera() creates a default sim3d.sensors.FisheyeCamera object in the 3D environment.

    fisheyeCamera = sim3d.sensors.FisheyeCamera(Name=Value) specifies options using one or more optional name-value arguments. For example, to create a fisheye camera actor with distortion center of [650,340], set DistortionCenter to [650,340].

    Input Arguments

    expand all

    Name-Value Arguments

    Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

    Example: fisheyeCamera = sim3d.sensors.FisheyeCamera(ActorName='FisheyeCamera',ImageSize=[768,1024])

    These intrinsic camera properties are equivalent to the properties of a fisheyeIntrinsics (Computer Vision Toolbox) object. To obtain the intrinsic properties for your camera, use the Camera Calibrator app.

    For details about the fisheye camera calibration process, see Using the Single Camera Calibrator App (Computer Vision Toolbox) and Fisheye Calibration Basics (Computer Vision Toolbox).

    Name of actor, specified as a character array or string. If you do not specify an actor name, then the software assigns the actor an autogenerated name. Use this argument to set the name of the sim3d.sensors.FisheyeCamera object.

    Note

    If you specify the same name as an actor that already exists, then the software appends actor name you specify with a unique identifier.

    Relative translation (x,y,z) of the actor object to its parent actor, specified as a real 1-by-3 vector, in m. Use Translation to change the position of the sim3d.sensors.FisheyeCamera object in the 3D environment along the X, Y, and Z axes of the coordinate system. When you add an actor to the 3D environment, the default parent actor is the Scene Origin at (0,0,0).

    Example: Translation=[1 2 1]

    Relative rotation (roll, pitch, yaw) of the actor object to its parent actor, specified as a real 1-by-3 vector, in rad. Use Rotation to rotate the sim3d.sensors.FisheyeCamera object in the 3D environment.

    Example: Rotation=[pi/4 pi/8 pi/2]

    Image size produced by the sim3d.sensors.FisheyeCamera object, specified as a real-valued 1-by-2 vector of positive integers of the form [m,n], in pixels. ImageSize is equivalent to the ImageSize (Computer Vision Toolbox) property of a cameraIntrinsics object.

    Center of distortion, specified as real-valued 1-by-2 vector, in pixels.

    Polynomial coefficients for the projection function described by Scaramuzza's Taylor model [1], specified as a real-valued 1-by-4 vector of the form [a0 a2 a3 a4].

    Example: MappingCoefficients=[320,-0.001,0,0]

    Transformation of a point from the sensor plane to a pixel in the camera image plane, specified as a real-valued 2-by-2 matrix. The misalignment occurs during the digitization process when the lens is not parallel to sensor.

    Example: StretchMatrix=[0 1; 0 1]

    Properties

    expand all

    Parent of actor, specified as a handle to the parent actor object. After you add an actor to the sim3d.World object, the default parent actor is the Scene Origin at (0,0,0). Use Parent to set any actor in the 3D environment as the parent actor of a sim3d.sensors.FisheyeCamera object.

    This property is read-only.

    Children of actor, specified as a structure. Each field of the structure contains a handle to the child of a sim3d.sensors.FisheyeCamera object.

    Parent world, specified as a handle to the parent sim3d.World object. You can use this property only if the sim3d.sensors.FisheyeCamera object is added to the parent sim3d.World object.

    This property is read-only.

    Unique ID of the sensor, specified as a real positive scalar.

    Data Types: uint32

    Relative translation (x,y,z) of the actor object to its parent actor, specified as a real 1-by-3 vector, in m. Use Translation to change the position of the sim3d.sensors.FisheyeCamera object in the 3D environment along the X, Y, and Z axes of the coordinate system. When you add an actor to the 3D environment, the default parent actor is the Scene Origin at (0,0,0).

    Example: fisheyeCamera.Translation = [1 2 1]

    Relative rotation (roll, pitch, yaw) of the actor object to its parent actor, specified as a real 1-by-3 vector, in rad. Use Rotation to rotate the sim3d.sensors.FisheyeCamera object in the 3D environment.

    Example: fisheyeCamera.Rotation = [pi/4 pi/8 pi/2]

    Type of actor mobility to respond to physics, move the actor during simulation, or both, specified as 'sim3d.utils.MobilityTypes.Movable' or 'sim3d.utils.MobilityTypes.Static'.

    Example: fisheyeCamera.Mobility = sim3d.utils.MobilityTypes.Movable

    Data Types: sim3d.utils.MobilityTypes

    Image size produced by the sim3d.sensors.FisheyeCamera object, specified as a real-valued 1-by-2 vector of positive integers of the form [m,n], in pixels. ImageSize is equivalent to the ImageSize (Computer Vision Toolbox) property of a cameraIntrinsics object.

    Center of distortion, specified as real-valued 1-by-2 vector, in pixels.

    Polynomial coefficients for the projection function described by Scaramuzza's Taylor model [1], specified as a real-valued 1-by-4 vector of the form [a0 a2 a3 a4].

    Example: fisheyeCamera.MappingCoefficients = [320,-0.001,0,0]

    Transformation of a point from the sensor plane to a pixel in the camera image plane, specified as a real-valued 2-by-2 matrix. The misalignment occurs during the digitization process when the lens is not parallel to sensor.

    Example: fisheyeCamera.StretchMatrix = [0 1; 0 1]

    Object Functions

    readReturn image data captured with fisheye camera

    References

    [1] Scaramuzza, Davide, Agostino Martinelli, and Ronald Siegwart. "A Toolbox for Easily Calibrating Omindirectional Cameras." In Proceedings to IEEE International Conference on Intelligent Robots and Systems (IROS 2006). Beijing, China, October 9–15, 2006. https://doi.org/10.1109/IROS.2006.282372.

    Version History

    Introduced in R2024b