Interface ICameraControl
Abstract camera control to generalize platform specific camera control
public interface ICameraControl
Properties
CurrentZoom
Gets or sets current zoom value. Works only when IsAbsoluteZoomSupported is true. When you set new zoom value then transition is abrupt. Use StartSmoothZoom function for smooth zoom transition.
float CurrentZoom { get; set; }
Property Value
IsAbsolutePanTiltSupported
Gets whether pan/tilt functions with absolute parameters are supported by current camera
bool IsAbsolutePanTiltSupported { get; }
Property Value
IsAbsoluteZoomSupported
Gets whether zoom functions with absolute parameters are supported by current camera
bool IsAbsoluteZoomSupported { get; }
Property Value
IsExposureSupported
Gets whether exposure functions are supported by current camera
bool IsExposureSupported { get; }
Property Value
IsFlashSupported
Gets whether flash on/off is supported by current camera
bool IsFlashSupported { get; }
Property Value
IsManualFocusSupported
Gets whether manual focus is supported by current camera
bool IsManualFocusSupported { get; }
Property Value
IsPanTiltSupported
Gets whether at least one pan/tilt function is supported by current camera
bool IsPanTiltSupported { get; }
Property Value
IsPresetSupported
Gets whether preset function is supported by current camera
bool IsPresetSupported { get; }
Property Value
IsSmoothZoomSupported
Gets whether smooth zoom functions are supported by current camera
bool IsSmoothZoomSupported { get; }
Property Value
IsSmoothZoomWithSpeedSupported
Gets whether smooth zoom with user specified speed function is supported by current camera
bool IsSmoothZoomWithSpeedSupported { get; }
Property Value
IsWhiteBalanceSupported
Gets whether white balance functions are supported by current camera
bool IsWhiteBalanceSupported { get; }
Property Value
IsZoomSpeedSupported
Gets whether continuous zoom is supported by current camera
bool IsZoomSpeedSupported { get; }
Property Value
IsZoomSupported
Gets whether at least one zoom function is supported by current camera
bool IsZoomSupported { get; }
Property Value
MaxZoom
Gets maximum zoom value
float MaxZoom { get; }
Property Value
MinZoom
Gets minimum zoom value
float MinZoom { get; }
Property Value
Methods
Focus()
Initiates camera auto-focus
void Focus()
RecallPreset(int, float)
Recalls specified camera preset
void RecallPreset(int presetNo, float speed)
Parameters
presetNointPreset number
speedfloatThe speed at which to move to the new preset: 0.0 (as slow as possible) .. 1.0 (as fast as possible)
SetAutoExposure()
Set auto exposure
void SetAutoExposure()
SetAutoWhiteBalance(WhiteBalance)
Set specified white balance preset
void SetAutoWhiteBalance(WhiteBalance whiteBalancePreset)
Parameters
whiteBalancePresetWhiteBalanceWhite balance preset
SetFlash(bool)
Turns camera flash on or off
void SetFlash(bool isOn)
Parameters
isOnboolIf true turns camera flash on, if false turns it off
SetManualExposure(float)
Set camera exposure iris manually
void SetManualExposure(float exposureLevel)
Parameters
exposureLevelfloatExposure level: 0.0 (dark) .. 1.0 (light)
SetManualExposure(float, float, float)
Set camera exposure parameters manually
void SetManualExposure(float iris, float gain, float shutterSpeed)
Parameters
irisfloatIris: 0.0 (dark) .. 1.0 (light)
gainfloatGain: 0.0 (dark) .. 1.0 (light)
shutterSpeedfloatShutter speed: 0.0 (slow) .. 1.0 (fast)
SetManualFocus(float)
Sets camera manual focus
void SetManualFocus(float focusValue)
Parameters
focusValuefloatFocus value: 0.0 (focused to infinity) .. 1.0 (focused as close as possible)
SetManualFocusSpeed(float)
Sets camera manual focus speed
void SetManualFocusSpeed(float focusSpeed)
Parameters
focusSpeedfloatFocus speed: -1.0 (focus outwards) ... +1.0 (focus inwards)
SetManualWhiteBalance(float, float)
Set white balance manual value
void SetManualWhiteBalance(float red, float blue)
Parameters
SetPanTilt(float, float)
Starts pan/tilt transition to specified position. Works only when IsAbsolutePanTiltSupported is true.
void SetPanTilt(float panValue, float tiltValue)
Parameters
panValuefloatDesired new pan value: -1.0 (left) .. 0.0 (centered) .. +1.0 (right)
tiltValuefloatDesired new tilt value: -1.0 (bottom) .. 0.0 (centered) .. +1.0 (top)
SetPanTiltSpeed(float, float)
Starts continuous pan/tilt transition with specified speeds.
void SetPanTiltSpeed(float panSpeed, float tiltSpeed)
Parameters
panSpeedfloatDesired new pan speed: -1.0 (moving right) .. 0.0 (stopped) .. +1.0 (moving left)
tiltSpeedfloatDesired new tilt speed: -1.0 (down) .. 0.0 (stopped) .. +1.0 (moving up)
SetZoomSpeed(float)
Starts continuous smooth zoom with specified speed. Works only when IsZoomSpeedSupported is true.
void SetZoomSpeed(float zoomSpeed)
Parameters
zoomSpeedfloatDesired zoom speed: -1.0 (zoom outwards) .. +1.0 (zoom inwards)
StartSmoothZoom(float)
Starts smooth zoom transition to zoomTo value. Works only when IsSmoothZoomSupported and IsAbsoluteZoomSupported are true.
void StartSmoothZoom(float zoomTo)
Parameters
zoomTofloatDesired new zoom value
StartSmoothZoom(float, float)
Starts smooth zoom transition to zoomTo value with specified zoom speed. Works only when IsSmoothZoomWithSpeedSupported and IsAbsoluteZoomSupported are true.
void StartSmoothZoom(float zoomTo, float zoomSpeed)
Parameters
StopPanTilt()
Stops pan/tilt transition currently in progress. If there is no transition in progress then does nothing.
void StopPanTilt()
StopSmoothZoom()
Stops zoom transition currently in progress. If there is no transition in progress then does nothing.
void StopSmoothZoom()
StorePreset(int)
Stores current camera preset
void StorePreset(int presetNo)
Parameters
presetNointPreset number