Trait ci2::Camera

source ·
pub trait Camera: CameraInfo + Send {
Show 42 methods // Required methods fn command_execute(&self, name: &str, verify: bool) -> Result<()>; fn feature_bool(&self, name: &str) -> Result<bool>; fn feature_bool_set(&self, name: &str, value: bool) -> Result<()>; fn feature_enum(&self, name: &str) -> Result<String>; fn feature_enum_set(&self, name: &str, value: &str) -> Result<()>; fn feature_float(&self, name: &str) -> Result<f64>; fn feature_float_set(&self, name: &str, value: f64) -> Result<()>; fn feature_int(&self, name: &str) -> Result<i64>; fn feature_int_set(&self, name: &str, value: i64) -> Result<()>; fn node_map_load(&self, settings: &str) -> Result<()>; fn node_map_save(&self) -> Result<String>; fn width(&self) -> Result<u32>; fn height(&self) -> Result<u32>; fn pixel_format(&self) -> Result<PixFmt>; fn possible_pixel_formats(&self) -> Result<Vec<PixFmt>>; fn set_pixel_format(&mut self, pixel_format: PixFmt) -> Result<()>; fn exposure_time(&self) -> Result<f64>; fn exposure_time_range(&self) -> Result<(f64, f64)>; fn set_exposure_time(&mut self, _: f64) -> Result<()>; fn exposure_auto(&self) -> Result<AutoMode>; fn set_exposure_auto(&mut self, _: AutoMode) -> Result<()>; fn gain(&self) -> Result<f64>; fn gain_range(&self) -> Result<(f64, f64)>; fn set_gain(&mut self, _: f64) -> Result<()>; fn gain_auto(&self) -> Result<AutoMode>; fn set_gain_auto(&mut self, _: AutoMode) -> Result<()>; fn trigger_mode(&self) -> Result<TriggerMode>; fn set_trigger_mode(&mut self, _: TriggerMode) -> Result<()>; fn acquisition_frame_rate_enable(&self) -> Result<bool>; fn set_acquisition_frame_rate_enable(&mut self, value: bool) -> Result<()>; fn acquisition_frame_rate(&self) -> Result<f64>; fn acquisition_frame_rate_range(&self) -> Result<(f64, f64)>; fn set_acquisition_frame_rate(&mut self, value: f64) -> Result<()>; fn trigger_selector(&self) -> Result<TriggerSelector>; fn set_trigger_selector(&mut self, _: TriggerSelector) -> Result<()>; fn acquisition_mode(&self) -> Result<AcquisitionMode>; fn set_acquisition_mode(&mut self, _: AcquisitionMode) -> Result<()>; fn acquisition_start(&mut self) -> Result<()>; fn acquisition_stop(&mut self) -> Result<()>; fn next_frame(&mut self) -> Result<DynamicFrame>; // Provided methods fn start_default_external_triggering(&mut self) -> Result<()> { ... } fn set_software_frame_rate_limit(&mut self, fps_limit: f64) -> Result<()> { ... }
}

Required Methods§

source

fn command_execute(&self, name: &str, verify: bool) -> Result<()>

source

fn feature_bool(&self, name: &str) -> Result<bool>

source

fn feature_bool_set(&self, name: &str, value: bool) -> Result<()>

source

fn feature_enum(&self, name: &str) -> Result<String>

source

fn feature_enum_set(&self, name: &str, value: &str) -> Result<()>

source

fn feature_float(&self, name: &str) -> Result<f64>

source

fn feature_float_set(&self, name: &str, value: f64) -> Result<()>

source

fn feature_int(&self, name: &str) -> Result<i64>

source

fn feature_int_set(&self, name: &str, value: i64) -> Result<()>

source

fn node_map_load(&self, settings: &str) -> Result<()>

Load camera settings from an implementation-dependent settings string.

This would typically be read from a file with extension given by CameraModule::settings_file_extension.

source

fn node_map_save(&self) -> Result<String>

Read camera settings to an implementation-dependent settings string.

This would typically be saved to a file with extension given by CameraModule::settings_file_extension.

source

fn width(&self) -> Result<u32>

Return the sensor width in pixels

source

fn height(&self) -> Result<u32>

Return the sensor height in pixels

source

fn pixel_format(&self) -> Result<PixFmt>

source

fn possible_pixel_formats(&self) -> Result<Vec<PixFmt>>

source

fn set_pixel_format(&mut self, pixel_format: PixFmt) -> Result<()>

source

fn exposure_time(&self) -> Result<f64>

value given in microseconds

source

fn exposure_time_range(&self) -> Result<(f64, f64)>

value given in microseconds

source

fn set_exposure_time(&mut self, _: f64) -> Result<()>

value given in microseconds

source

fn exposure_auto(&self) -> Result<AutoMode>

source

fn set_exposure_auto(&mut self, _: AutoMode) -> Result<()>

source

fn gain(&self) -> Result<f64>

value given in dB

source

fn gain_range(&self) -> Result<(f64, f64)>

value given in dB

source

fn set_gain(&mut self, _: f64) -> Result<()>

value given in dB

source

fn gain_auto(&self) -> Result<AutoMode>

source

fn set_gain_auto(&mut self, _: AutoMode) -> Result<()>

source

fn trigger_mode(&self) -> Result<TriggerMode>

source

fn set_trigger_mode(&mut self, _: TriggerMode) -> Result<()>

source

fn acquisition_frame_rate_enable(&self) -> Result<bool>

source

fn set_acquisition_frame_rate_enable(&mut self, value: bool) -> Result<()>

source

fn acquisition_frame_rate(&self) -> Result<f64>

source

fn acquisition_frame_rate_range(&self) -> Result<(f64, f64)>

source

fn set_acquisition_frame_rate(&mut self, value: f64) -> Result<()>

source

fn trigger_selector(&self) -> Result<TriggerSelector>

source

fn set_trigger_selector(&mut self, _: TriggerSelector) -> Result<()>

source

fn acquisition_mode(&self) -> Result<AcquisitionMode>

source

fn set_acquisition_mode(&mut self, _: AcquisitionMode) -> Result<()>

source

fn acquisition_start(&mut self) -> Result<()>

source

fn acquisition_stop(&mut self) -> Result<()>

source

fn next_frame(&mut self) -> Result<DynamicFrame>

synchronous (blocking) frame acquisition

Provided Methods§

source

fn start_default_external_triggering(&mut self) -> Result<()>

Set the camera to use external triggering using default parameters.

The default parameters may vary by camera backend will ideally use a hardware trigger to trigger the start of each frame.

source

fn set_software_frame_rate_limit(&mut self, fps_limit: f64) -> Result<()>

Implementors§