pub struct DeviceConfigurationBuilder { /* private fields */ }Implementations§
Source§impl DeviceConfigurationBuilder
impl DeviceConfigurationBuilder
Sourcepub fn color_format(self, value: ImageFormat) -> DeviceConfigurationBuilder
pub fn color_format(self, value: ImageFormat) -> DeviceConfigurationBuilder
Image format to capture with the color camera.
Sourcepub fn color_resolution(
self,
value: ColorResolution,
) -> DeviceConfigurationBuilder
pub fn color_resolution( self, value: ColorResolution, ) -> DeviceConfigurationBuilder
Image resolution to capture with the color camera.
Sourcepub fn depth_mode(self, value: DepthMode) -> DeviceConfigurationBuilder
pub fn depth_mode(self, value: DepthMode) -> DeviceConfigurationBuilder
Capture mode for the depth camera.
Examples found in repository?
examples/open_device.rs (line 7)
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 camera_fps(self, value: Fps) -> DeviceConfigurationBuilder
pub fn camera_fps(self, value: Fps) -> DeviceConfigurationBuilder
Desired frame rate for the color and depth camera.
Sourcepub fn synchronized_images_only(self, value: bool) -> DeviceConfigurationBuilder
pub fn synchronized_images_only(self, value: bool) -> DeviceConfigurationBuilder
Only produce k4a_capture_t objects if they contain synchronized color and depth images.
Sourcepub fn depth_delay_off_color_usec(
self,
value: i32,
) -> DeviceConfigurationBuilder
pub fn depth_delay_off_color_usec( self, value: i32, ) -> DeviceConfigurationBuilder
Desired delay between the capture of the color image and the capture of the depth image.
Sourcepub fn wired_sync_mode(self, value: WiredSyncMode) -> DeviceConfigurationBuilder
pub fn wired_sync_mode(self, value: WiredSyncMode) -> DeviceConfigurationBuilder
The external synchronization mode.
Sourcepub fn subordinate_delay_off_master_usec(
self,
value: u32,
) -> DeviceConfigurationBuilder
pub fn subordinate_delay_off_master_usec( self, value: u32, ) -> DeviceConfigurationBuilder
The external synchronization timing.
Sourcepub fn disable_streaming_indicator(
self,
value: bool,
) -> DeviceConfigurationBuilder
pub fn disable_streaming_indicator( self, value: bool, ) -> DeviceConfigurationBuilder
Streaming indicator automatically turns on when the color or depth camera’s are in use.
Sourcepub fn build(&self) -> DeviceConfiguration
pub fn build(&self) -> DeviceConfiguration
Examples found in repository?
examples/open_device.rs (line 8)
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}Trait Implementations§
Source§impl Default for DeviceConfigurationBuilder
impl Default for DeviceConfigurationBuilder
Source§fn default() -> DeviceConfigurationBuilder
fn default() -> DeviceConfigurationBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DeviceConfigurationBuilder
impl RefUnwindSafe for DeviceConfigurationBuilder
impl Send for DeviceConfigurationBuilder
impl Sync for DeviceConfigurationBuilder
impl Unpin for DeviceConfigurationBuilder
impl UnwindSafe for DeviceConfigurationBuilder
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