Capture Settings
This page describes how to set and get various capture settings of connected camera device using RICOH Camera Wireless SDK.
Contents
Supported Capture Settings
- Aperture Value
- Exposure Compensation
- ISO Sensitivity Value
- White Balance
- Shutter Speed
- Custom Image
- Digital Filter
- Still Image Capture Format
- Still Image Quality
- Movie Capture Format
Core Class
The core class of capture settings is:
CaptureSetting
- The
CaptureSetting
class represents various capture settings of camera devices. - Supported capture settings are provided as derived classes of the
CaptureSetting
class.
Basic Usage
All the supported capture settings have corresponding classes derived from the CaptureSetting
class.
This section shows you how to use manage individual capture settings using the classes.
You can also manage multiple capture settings at the same time.
Code examples in this section show how to manage aperture value but you can manage other settings in similar ways.
Get Individual Capture Settings
Follow the steps below to get current value of specified capture setting.
- Generate an object of the class corresponding to the capture setting you want
- Use the
getCaptureSettings
method with the object.
The following example shows how to get current aperture value using FNumber
object
let fNumber = FNumber()
let response = cameraDevice.getCaptureSettings(settings: [fNumber])
if response.result == Result.ok {
print("Current Value: \(fNumber.description)")
}
List Available Setting Values
Follow the steps below to get a list of available values for individual capture settings.
- Generate an object of the class corresponding to the capture setting you want
- Use the
getCaptureSettings
method with the object - Use the
availableSettings
property of the object
The following example shows how to get a list of available aperture values using FNumber
object.
let fNumber = FNumber()
let response = cameraDevice.getCaptureSettings(settings: [fNumber])
if response.result == Result.ok {
for setting in fNumber.availableSettings {
print("Available Setting: \(setting.description)")
}
}
Set Individual Capture Setting
Follow the steps below to set value of specified capture setting.
- Select a class and its field corresponding to the value you want to set
- Use the
setCaptureSettings
method with the field
The following example shows how to set the aperture value to 5.6 using FNumber
object.
let fNumber = FNumber.f5_6
let response = cameraDevice.setCaptureSettings(settings: [fNumber])
Get Multiple Capture Settings
The following example shows how to get shutter speed and exposure compensation value at the same time.
let shutterSpeed = ShutterSpeed()
let exposureCompensation = ExposureCompensation()
let response =
cameraDevice.getCaptureSettings(settings: [shutterSpeed, exposureCompensation])
Set Multiple Capture Settings
The following example shows how to set shutter speed and exposure compensation value at the same time.
let shutterSpeed = ShutterSpeed.ss1_80
let exposureCompensation = ExposureCompensation.ec0_3
let response =
cameraDevice.setCaptureSettings(settings: [shutterSpeed, exposureCompensation])
Aperture Value
Use the FNumber
class to set and get aperture values.
Get the Current Value & List Available Values
The following example shows how to get current aperture value using FNumber
object.
Use the availableSettings
property of the FNumber
class to get a list of available aperture values.
let fNumber = FNumber()
let response = cameraDevice.getCaptureSettings(settings: [fNumber])
if response.result == Result.ok {
let availableList = fNumber.availableSettings
}
Set Value
The following example demonstrates how to set aperture value to 5.6 using FNumber
object.
let fNumber = FNumber.f5_6
let response = cameraDevice.setCaptureSettings(settings: [fNumber])
Exposure Compensation
Use the ExposureCompensation
class to set and get exposure compensation values.
Get the Current Value & List Available Values
The following example shows how to get current exposure compensation value using ExposureCompensation
object.
Use the availableSettings
property of the ExposureCompensation
class to get a list of available exposure compensation values.
let exposureCompensation = ExposureCompensation()
let response = cameraDevice.getCaptureSettings(settings: [exposureCompensation])
if response.result == Result.ok {
let availableList = exposureCompensation.availableSettings
}
Set Value
The following example demonstrates how to set exposure compensation to +0.3EV using ExposureCompensation
object.
let exposureCompensation = ExposureCompensation.ec0_3
let response = cameraDevice.setCaptureSettings(settings: [exposureCompensation])
ISO Sensitivity Value
Use the ISO
class to set and get ISO sensitivity values.
Get the Current Value & List Available Values
The following example shows how to get current ISO sensitivity value using ISO
object.
Use the availableSettings
property of the ISO
class to get a list of available ISO sensitivity values.
let iso = ISO()
let response = cameraDevice.getCaptureSettings(settings: [iso])
if response.result == Result.ok {
let availableList = iso.availableSettings
}
Set Value
The following example demonstrates how to set ISO sensitivity value to ISO400 using ISO
object.
let iso = ISO.ISO400
let response = cameraDevice.setCaptureSettings(settings: [iso])
White Balance
Use the WhiteBalance
class to set and get white balance values.
Get the Current Value & List Available Values
The following example shows how to get current white balance value using WhiteBalance
object.
Use the availableSettings
property of the WhiteBalance
class to get a list of available white balance values.
let whiteBalance = WhiteBalance()
let response = cameraDevice.getCaptureSettings(settings: [whiteBalance])
if response.result == Result.ok {
let availableList = whiteBalance.availableSettings
}
Set Value
The following example demonstrates how to set white balance to daylight using WhiteBalance
object.
let whiteBalance = WhiteBalance.daylight
let response = cameraDevice.setCaptureSettings(settings: [whiteBalance])
Shutter Speed
Use the ShutterSpeed
class to set and get shutter speed values.
Get the Current Value & List Available Values
The following example shows how to get current shutter speed value using ShutterSpeed
object.
Use the availableSettings
property of the ShutterSpeed
class to get a list of available shutter speed values.
let shutterSpeed = ShutterSpeed()
let response = cameraDevice.getCaptureSettings(settings: [shutterSpeed])
if response.result == Result.ok {
let availableList = shutterSpeed.availableSettings
}
Set Value
The following example demonstrates how to set shutter speed to 1/80 using ShutterSpeed
object.
let shutterSpeed = ShutterSpeed.ss1_80
let response = cameraDevice.setCaptureSettings(settings: [shutterSpeed])
Custom Image
Use the CustomImage
class to set and get custom image values.
Get the Current Value & List Available Values
The following example shows how to get current custom image value using CustomImage
object.
Use the availableSettings
property of the CustomImage
class to get a list of available custom image values.
let customImage = CustomImage()
let response = cameraDevice.getCaptureSettings(settings: [customImage])
if response.result == Result.ok {
let availableList = customImage.availableSettings
}
Set Value
The following example demonstrates how to set custom image to landscape using CustomImage
object.
let customImage = CustomImage.landscape
let response = cameraDevice.setCaptureSettings(settings: [customImage])
Digital Filter
Use the DigitalFilter
class to set and get digital filter values.
Get the Current Value & List Available Values
The following example shows how to get current digital filter value using DigitalFilter
object.
Use the availableSettings
property of the DigitalFilter
class to get a list of available digital filter values.
let digitalFilter = DigitalFilter()
let response = cameraDevice.getCaptureSettings(settings: [digitalFilter])
if response.result == Result.ok {
let availableList = digitalFilter.availableSettings
}
Set Value
The following example demonstrates how to set digital filter to toy camera using DigitalFilter
object.
let digitalFilter = DigitalFilter.toyCamera
let response = cameraDevice.setCaptureSettings(settings: [digitalFilter])
Still Image Capture Format
Use the StillImageCaptureFormat
class to set and get still image capture format values.
Get the Current Value & List Available Values
The following example shows how to get current still image capture format value using StillImageCaptureFormat
object.
Use the availableSettings
property of the StillImageCaptureFormat
class to get a list of available still image capture format values.
let stillImageCaptureFormat = StillImageCaptureFormat()
let response = cameraDevice.getCaptureSettings(settings: [stillImageCaptureFormat])
if response.result == Result.ok {
let availableList = stillImageCaptureFormat.availableSettings
}
Set Value
The following example demonstrates how to set still image capture format to RAW(DNG) using StillImageCaptureFormat
object.
let stillImageCaptureFormat = StillImageCaptureFormat.DNG
let response = cameraDevice.setCaptureSettings(settings: [stillImageCaptureFormat])
Still Image Quality
Use the StillImageQuality
class to set and get still image quality values.
Get the Current Value & List Available Values
The following example shows how to get current still image quality value using StillImageQuality
object.
Use the availableSettings
property of the StillImageQuality
class to get a list of available still image quality values.
let stillImageQuality = StillImageQuality()
let response = cameraDevice.getCaptureSettings(settings: [stillImageQuality])
if response.result == Result.ok {
let availableList = stillImageQuality.availableSettings
}
Set Value
The following example demonstrates how to set still image quality to “Recorded Pixels”:Large and “Quality Level”:Best using StillImageQuality
object.
let stillImageQuality = StillImageQuality.largeBest
let response = cameraDevice.setCaptureSettings(settings: [stillImageQuality])
Movie Capture Format
Use the MovieCaptureFormat
class to set and get movie capture format values.
Get the Current Value & List Available Values
The following example shows how to get current movie capture format value using MovieCaptureFormat
object.
Use the availableSettings
property of the MovieCaptureFormat
class to get a list of available movie capture format values.
let movieCaptureFormat = MovieCaptureFormat()
let response = cameraDevice.getCaptureSettings(settings: [movieCaptureFormat])
if response.result == Result.ok {
let availableList = movieCaptureFormat.availableSettings
}
Set Value
The following example demonstrates how to set movie capture format to “Still Image Size”:FullHD and “Frame Rate”:60i using MovieCaptureFormat
object.
let movieCaptureFormat = MovieCaptureFormat.fullHD60i
let response = cameraDevice.setCaptureSettings(settings: [movieCaptureFormat])