#[repr(C)]pub struct CameraInfo {
pub header: Header,
pub height: u32,
pub width: u32,
pub distortion_model: DistortionModel,
pub d: Vec<f64>,
pub k: [f64; 9],
pub r: [f64; 9],
pub p: [f64; 12],
pub binning_x: u32,
pub binning_y: u32,
pub roi: RegionOfInterest,
}
Expand description
§Header timestamp should be acquisition time of image
Header frame_id should be optical frame of camera origin of frame should be optical center of camera +x should point to the right in the image +y should point down in the image +z should point into the plane of the image
Fields§
§header: Header
§height: u32
Calibrated width
width: u32
Calibrated height
distortion_model: DistortionModel
§d: Vec<f64>
distortion parameters
k: [f64; 9]
Intrinsic camera matrix for the raw images. [ fx 0 cx ] [ 0 fy cy ] [ 0 0 1 ] Projectd 3D points in the camera coordinate frame to 2D pixel coordinates using the focal lengths (fx,fy) and principal point (cx, cy)
r: [f64; 9]
Rectification matrix for stereo cameras A rotation matrix aligning the camera coordinate system to the ideal stereo image plane so that epipolar lines in both stereo images are parallel
p: [f64; 12]
§Projection/camera matrix
binning_x: u32
§binning_y: u32
§roi: RegionOfInterest
Region of interest (subwindow of full camera resolution), given in full resolution (unbinned) image coordinates. A particular ROI always denotes the same window of pixels on the camera sensor, regardless of binning settings. The default setting of roi (all values 0) is considered the same as full resolution (roi.width = width, roi.height = height).
Implementations§
Source§impl CameraInfo
impl CameraInfo
Sourcepub fn create_topic_with_name(
participant: &DdsParticipant,
name: &str,
maybe_qos: Option<DdsQos>,
maybe_listener: Option<DdsListener>,
) -> Result<DdsTopic<Self>, DDSError>
pub fn create_topic_with_name( participant: &DdsParticipant, name: &str, maybe_qos: Option<DdsQos>, maybe_listener: Option<DdsListener>, ) -> Result<DdsTopic<Self>, DDSError>
Create a topic using of this Type specifying the topic name
§Arguments
participant
- The participant handle onto which this topic should be createdname
- The name of the topicmaybe_qos
- A QoS structure for this topic. The Qos is optionalmaybe_listener
- A listener to use on this topic. The listener is optional
Sourcepub fn create_topic(
participant: &DdsParticipant,
maybe_topic_prefix: Option<&str>,
maybe_qos: Option<DdsQos>,
maybe_listener: Option<DdsListener>,
) -> Result<DdsTopic<Self>, DDSError>
pub fn create_topic( participant: &DdsParticipant, maybe_topic_prefix: Option<&str>, maybe_qos: Option<DdsQos>, maybe_listener: Option<DdsListener>, ) -> Result<DdsTopic<Self>, DDSError>
Create a topic of this Type using the default topic name. The default topic name is provided by the Self::topic_name function.
§Arguments
participant
- The participant handle onto which this topic should be createdmaybe_topic_prefix
- An additional prefix to be added to the topic name. This can be Nonemaybe_qos
- A QoS structure for this topic. The Qos is optionalmaybe_listener
- A listener to use on this topic. The listener is optional
Sourcepub fn create_sample_buffer(len: usize) -> SampleBuffer<CameraInfo>
pub fn create_sample_buffer(len: usize) -> SampleBuffer<CameraInfo>
Create a sample buffer for storing an array of samples You can pass the sample buffer into a read to read multiple samples. Multiple samples are useful when you have one or more keys in your topic structure. Each value of the key will result in the storage of another sample.