Camera Settings
Defined in framework ScanditDataCaptureCore
- SDCCameraPosition
Added in version 6.0.0
- SDCCameraPositionWorldFacing
Added in version 6.0.0
The camera is attached at the back of the device and is facing away from the user.
- SDCCameraPositionUserFacing
Added in version 6.0.0
The camera is attached on the front of the device and facing towards the user.
- SDCCameraPositionUnspecified
Added in version 6.0.0
The camera position is unspecified.
- SDCVideoResolution
Added in version 6.0.0
- SDCVideoResolutionHD
Added in version 6.0.0
Resolution is 1280x720.
- SDCVideoResolutionFullHD
Added in version 6.0.0
Resolution is 1920x1080.
- SDCVideoResolutionUHD4K
Added in version 6.0.0
Resolution is 3840x2160. Please note: Usage of this resolution is not part of every license. If you encounter issues, please contact us at support@scandit.com.
- SDCVideoResolutionAuto
Added in version 6.0.0
In contrast to SDCVideoResolutionFullHD, and SDCVideoResolutionHD, SDCVideoResolutionAuto will select the resolution based on hardware capabilities and/or scan-performance considerations. The chosen resolution may change in future versions of the software.
- SDCFocusRange
Added in version 6.0.0
Enumeration of possible focus ranges to use. This can be used to restrict the auto-focus system to only consider objects in a certain range to focus on.
- SDCFocusRangeFull
Added in version 6.0.0
Use the full focus range supported by the camera.
- SDCFocusRangeNear
Added in version 6.0.0
Only focus on objects that are near to the camera.
- SDCFocusRangeFar
Added in version 6.0.0
Only focus on objects that are far from the camera.
- SDCFocusGestureStrategy
Added in version 6.6.0
Enumeration of possible focus gesture strategies to use.
- SDCFocusGestureStrategyNone
Added in version 6.6.0
No effect when performing a focus gesture.
- SDCFocusGestureStrategyManual
Added in version 6.6.0
Focus on PoI and only change with next focus gesture.
- SDCFocusGestureStrategyManualUntilCapture
Added in version 6.6.0
Focus on PoI and reset to previous focus strategy on capture.
- SDCFocusGestureStrategyAutoOnLocation
Added in version 6.7.0
Continuously focus on the location of the gesture and only change with next focus gesture.
- SDCMacroMode
Added in version 6.17.0
Enumeration of possible macro modes to use. This can be used to allow very small codes to be scanned on supported devices.
To determine if the current device supports macro mode use SDCCamera.isMacroModeAvailable.
- SDCMacroModeAuto
Added in version 6.17.0
Automatically enable macro mode depending on focus position, zoom factor, and light level.
- SDCMacroModeOff
Added in version 6.17.0
Disable macro mode.
- SDCMacroModeOn
Added in version 6.17.0
Enable macro mode.
- SDCCameraSettings
@interface SDCCameraSettings : NSObject
Added in version 6.0.0
Holds camera-specific settings such as preferred resolution, maximum frame rate etc. The defaults are chosen such that they work for a wide variety of use cases. You may apply custom settings to further optimize scan performance for your particular use case. There is typically no need to customize the camera settings beyond changing the preferred resolution.
For best performance use the camera settings returned by the capture mode you are using, e.g. SDCBarcodeCapture.recommendedCameraSettings, or SDCBarcodeTracking.recommendedCameraSettings etc.
Note
This class is not thread safe.
- - init
- (instancetype)init
Added in version 6.0.0
Creates new default camera settings. zoomFactor is set to 1 and preferredResolution is set to SDCVideoResolutionAuto.
- - initWithSettings:
- (instancetype)initWithSettings:(nonnull SDCCameraSettings *)settings
Added in version 6.0.0
Creates a copy of the provided settings.
Holds camera related settings such as preview resolution and maximum frame rate to use.
- preferredResolution
@property (nonatomic, assign) SDCVideoResolution preferredResolution
Added in version 6.0.0
The preferred resolution to use for the camera. The camera will use the resolution that is closests to the resolution preference. For example, if only lower resolutions than the preferred resolution are available, the highest available resolution will be used.
The resolution chosen by the camera only takes the preferredResolution into account, it does not consider the resolution limit of your license key. When the device selects a resolution that is larger than what you have licensed, the data capture context will report a license status error.
The default value is SDCVideoResolutionAuto.
- maxFrameRate
@property (nonatomic, assign) CGFloat maxFrameRate
Added in version 6.0.0
The maximum frame rate to use for the camera. If the value is higher than the maximum available frame rate of the device, it will be set to the device’s maximum.
The default value is 30 Hz.
Deprecated since version 6.7.0: The frame rate is optimized internally based on the used device. Setting max frame rate may have no effect due to camera or device-specific restrictions.
- zoomFactor
@property (nonatomic, assign) CGFloat zoomFactor
Added in version 6.0.0
The zoom factor to use for the camera. This value is a multiplier, a value of 1.0 means no zoom, while a value of 2.0 doubles the size of the image, but halves the field of view.
Values less than 1.0 are treated as 1.0. Values greater than the maximum available zoom factor are clamped to the maximum accepted value.
The default zoom factor is 1.0.
- shouldPreferSmoothAutoFocus
@property (nonatomic, assign)
BOOL
shouldPreferSmoothAutoFocusAdded in version 6.4.0
Whether to prefer smooth auto-focus. The default settings have this turned off. Enable it to switch to a smoother (but potentially less reliable) auto-focus strategy. For some devices, this property has no effect.
- focusRange
@property (nonatomic, assign) SDCFocusRange focusRange
Added in version 6.0.0
The focus range to primarily use, if supported by the device.
- focusGestureStrategy
@property (nonatomic, assign) SDCFocusGestureStrategy focusGestureStrategy
Added in version 6.6.0
The focus gesture strategy to use.
- zoomGestureZoomFactor
@property (nonatomic, assign) CGFloat zoomGestureZoomFactor
Added in version 6.6.0
The zoom factor to move to when the zoom in gesture was performed. This value is a multiplier, a value of 1.0 means no zoom, while a value of 2.0 doubles the size of the image, but halves the field of view. See also zoomFactor.
The default zoom factor for the zoom in gesture is 2.0.
- torchLevel
@property (nonatomic, assign) CGFloat torchLevel
Added in version 6.7.0
The torch intensity level. This value must be a number between 0.0 and 1.0. If a number outside the range is provided, either 0.0 or 1.0 will be used instead. Setting the torch level to 0.0 is equivalent to having the torch off.
- macroMode
@property (nonatomic, assign) SDCMacroMode macroMode
Added in version 6.17.0
The macro mode to use, if supported by the device.
The default value is SDCMacroModeAuto.
- - setValue:forProperty:
- (
void
)setValue:(nonnullid
)value forProperty:(nonnull NSString *)propertyAdded in version 6.2.0
Set camera property to the provided value. Use this method to set properties that are not yet part of a stable API. Properties set through this method may or may not be used or change in a future release.
- NSStringFromVideoResolution(videoResolution)
NSString *_Nonnull NSStringFromVideoResolution(SDCVideoResolution videoResolution)
Added in version 6.1.0
- SDCVideoResolutionFromJSONString(JSONString, videoResolution)
BOOL
SDCVideoResolutionFromJSONString(NSString *_Nonnull JSONString, SDCVideoResolution *_Nonnull videoResolution)Added in version 6.1.0
Deprecated since version 6.26.0: This function will be removed in the future.
- NSStringFromFocusRange(focusRange)
NSString *_Nonnull NSStringFromFocusRange(SDCFocusRange focusRange)
Added in version 6.1.0
- SDCFocusRangeFromJSONString(JSONString, focusRange)
BOOL
SDCFocusRangeFromJSONString(NSString *_Nonnull JSONString, SDCFocusRange *_Nonnull focusRange)Added in version 6.1.0
Deprecated since version 6.26.0: This function will be removed in the future.
- NSStringFromFocusGestureStrategy(focusGestureStrategy)
NSString *_Nonnull NSStringFromFocusGestureStrategy(SDCFocusGestureStrategy focusGestureStrategy)
Added in version 6.7.0
- SDCFocusGestureStrategyFromJSONString(JSONString, focusGestureStrategy)
BOOL
SDCFocusGestureStrategyFromJSONString(NSString *_Nonnull JSONString, SDCFocusGestureStrategy *_Nonnull focusGestureStrategy)Added in version 6.7.0
Deprecated since version 6.26.0: This function will be removed in the future.
- NSStringFromMacroMode(macroMode)
NSString *_Nonnull NSStringFromMacroMode(SDCMacroMode macroMode)
Added in version 6.17.0
Deprecated since version 6.26.0: This function will be removed in the future.
- SDCMacroModeFromJSONString(JSONString, macroMode)
BOOL
SDCMacroModeFromJSONString(NSString *_Nonnull JSONString, SDCMacroMode *_Nonnull macroMode)Added in version 6.17.0
Deprecated since version 6.26.0: This function will be removed in the future.