pub struct DeviceConfiguration { /* private fields */ }Implementations§
Source§impl DeviceConfiguration
impl DeviceConfiguration
Sourcepub fn builder() -> DeviceConfigurationBuilder
pub fn builder() -> DeviceConfigurationBuilder
Examples found in repository?
examples/open_device.rs (line 6)
3pub fn main() -> std::result::Result<(), Box<dyn std::error::Error>> {
4 let factory = Factory::new()?;
5 let device = factory.device_open(0)?;
6 let camera_config = DeviceConfiguration::builder()
7 .depth_mode(DepthMode::WFov2x2Binned)
8 .build();
9 let camera = device.start_cameras(&camera_config)?;
10
11 if let Ok(capture) = camera.get_capture(1000) {
12 let image = capture.get_color_image();
13 println!(
14 "format = {:?}, width = {}, height = {}, temparature = {}",
15 image.get_format(),
16 image.get_width_pixels(),
17 image.get_height_pixels(),
18 capture.get_temperature_c()
19 );
20 }
21
22 Ok(())
23}Sourcepub fn color_format(&self) -> ImageFormat
pub fn color_format(&self) -> ImageFormat
Image format to capture with the color camera.
Sourcepub fn color_resolution(&self) -> ColorResolution
pub fn color_resolution(&self) -> ColorResolution
Image resolution to capture with the color camera.
Sourcepub fn depth_mode(&self) -> DepthMode
pub fn depth_mode(&self) -> DepthMode
Capture mode for the depth camera.
Sourcepub fn camera_fps(&self) -> Fps
pub fn camera_fps(&self) -> Fps
Desired frame rate for the color and depth camera.
Sourcepub fn synchronized_images_only(&self) -> bool
pub fn synchronized_images_only(&self) -> bool
Only produce k4a_capture_t objects if they contain synchronized color and depth images.
Sourcepub fn depth_delay_off_color_usec(&self) -> i32
pub fn depth_delay_off_color_usec(&self) -> i32
Desired delay between the capture of the color image and the capture of the depth image.
Sourcepub fn wired_sync_mode(&self) -> WiredSyncMode
pub fn wired_sync_mode(&self) -> WiredSyncMode
The external synchronization mode.
Sourcepub fn subordinate_delay_off_master_usec(&self) -> u32
pub fn subordinate_delay_off_master_usec(&self) -> u32
The external synchronization timing.
Sourcepub fn disable_streaming_indicator(&self) -> bool
pub fn disable_streaming_indicator(&self) -> bool
Streaming indicator automatically turns on when the color or depth camera’s are in use.
Trait Implementations§
Source§impl Clone for DeviceConfiguration
impl Clone for DeviceConfiguration
Source§fn clone(&self) -> DeviceConfiguration
fn clone(&self) -> DeviceConfiguration
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for DeviceConfiguration
impl Default for DeviceConfiguration
Source§fn default() -> DeviceConfiguration
fn default() -> DeviceConfiguration
Returns the “default value” for a type. Read more
impl Copy for DeviceConfiguration
Auto Trait Implementations§
impl Freeze for DeviceConfiguration
impl RefUnwindSafe for DeviceConfiguration
impl Send for DeviceConfiguration
impl Sync for DeviceConfiguration
impl Unpin for DeviceConfiguration
impl UnwindSafe for DeviceConfiguration
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more