prip::ViscaControl Class Reference

#include <IPCamera.h>

Inheritance diagram for prip::ViscaControl:

prip::ViscaIP List of all members.

Detailed Description

Visca Control Class.

This class implements some of the VISCA specification.

NB: Daisy chaining and sending inquieris is not supported by now.

VISCA Documentation is partially taken from:

Definition at line 349 of file IPCamera.h.

Public Types

 TCommand = 0x01
 TInquiry = 0x09
 CInterface = 0x00
 CCamera = 0x04
 CPanTilt = 0x06
 FMManual
 Manual Focus.
 FMAuto
 AutoFocus.
 FMSwitch
 Switch between Manual and AutoFocus.
 FMOnePushTrigger
 One Push Trigger; when a Trigger Command is received, the lens moves to adjust the focus for the subject.
 FMInfinity
 Infinity mode - the lens is forcibly moved to a position suitable for an unlimited distance.
 FMNearLimit
 Near Limit Mode - the focus range is narrowd by excluding the unnecessary range.
 AFSNormal = 0x02
 Normal (high) AF sensitivity Reasches the highest focus speed quickly.
 AFSLow = 0x03
 Low AF sensitivity Improves the stability of the focus.
 AFNormal
 This is the normal mode for AF operations.
 AFInterval
 The mode used for AF movements carried out at defined intervals.
 AFZoomTrigger
 AFActiveInterval
 IMLens = 0x01
 Lens Correction.
 IMCompScan = 0x02
 Correction of CCD pixel blemishes.
 WBAuto = 0
 Normal Auto Mode This mode computes the white balance value output using color information form the entire screen.
 WBIndoor
 Indoor mode (3200 K).
 WBOutdoor
 Outdoor mode (5800 K).
 WBOnePushWB
 One Push mode The One Push White Balance mode is a fixed white balance mode that may be automatically readjusted only at the request of the User (One Push Trigger), assuming that a white subject in correct lighting conditions and occupying more than 50% of the image is submitted to the camera.
 WBATW
 Auto Tracing White Balance (2000 to 10000K).
 WBManual
 Manual Control Mode Manual Control of R and B gain, 256 steps each.
 WBOnePushTrigger
 One Push WB Trigger Mode.
 GainReset = 0
 GainUp = 0x02
 GainDown = 0x03
 GainDirect = 0xFF
 AEAuto = 0x00
 Automatic Exposure Mode - Auto Iris and Gain, Fixed Shutter Speed (NTSC 1/60sec, PAL 1/50sec).
 AEManual = 0x03
 Manual Control Mode - Variable Shutter, Iris and Gain.
 AEShutter = 0x0A
 AEIris = 0x0B
 Iris Priority Automatic Exposure Mode - Variable Iris (F1.4 to Close 18 steps), Auto Gain and Shutter speed.
 AEBright = 0x0D
 Variable Iris and Gain (Close to F1.6, 17 steps at 0dB: F1.4, 15 steps from 0 to 28dB).
 CPReset = 0x00
 CPUp = 0x02
 CPDown = 0x03
 CPDirect = 0xFF
 PEOff = 0x02
 no picture effects
 PENegArt = 0x03
 Negative/Positive Reversal.
 PEMonochrome = 0x04
 Monochrome Image.
 Up
 Down
 Left
 Right
 UpLeft
 UpRight
 DownLeft
 DownRight
 Stop
 Home
enum  Type { TCommand = 0x01, TInquiry = 0x09 }
 type of the request - Command/Inquiry More...
enum  Category { CInterface = 0x00, CCamera = 0x04, CPanTilt = 0x06 }
 category code More...
enum  FocusMode {
  FMManual, FMAuto, FMSwitch, FMOnePushTrigger,
  FMInfinity, FMNearLimit
}
 Focus Mode. More...
enum  AFSensitivity { AFSNormal = 0x02, AFSLow = 0x03 }
 list of possible AF Sensitivity Settings More...
enum  AFMode { AFNormal, AFInterval, AFZoomTrigger, AFActiveInterval }
 list of possible AF Movement modes More...
enum  InitializationMode { IMLens = 0x01, IMCompScan = 0x02 }
enum  WBMode {
  WBAuto = 0, WBIndoor, WBOutdoor, WBOnePushWB,
  WBATW, WBManual, WBOnePushTrigger
}
 list of possible White Balance settings More...
enum  GainMode { GainReset = 0, GainUp = 0x02, GainDown = 0x03, GainDirect = 0xFF }
 list of possible gain modes More...
enum  AEMode {
  AEAuto = 0x00, AEManual = 0x03, AEShutter = 0x0A, AEIris = 0x0B,
  AEBright = 0x0D
}
enum  ChangeParam { CPReset = 0x00, CPUp = 0x02, CPDown = 0x03, CPDirect = 0xFF }
 Parameter for various change operations. More...
enum  PictureEffect { PEOff = 0x02, PENegArt = 0x03, PEMonochrome = 0x04 }
enum  Direction {
  Up, Down, Left, Right,
  UpLeft, UpRight, DownLeft, DownRight,
  Stop, Home
}
 Possible Directions for Pan-Tilt Drive. More...

Public Member Functions

void CAM_Power (bool on)
 turns Pan/Tilter Power on or off
void CAM_ZoomStop (void)
 stops zooming
void CAM_ZoomIn (int speed=-1)
 zooms in at speed speed.
void CAM_ZoomOut (int speed=-1)
 zooms out at speed speed.
void CAM_ZoomTo (int pos)
 zooms to position pos.
void CAM_FocusStop (void)
 Focus Control: Stop Focus change.
void CAM_FocusFar (int speed=-1)
 Focus Control: Set focus farer NB: Focus Mode is set to Manual Focus.
void CAM_FocusNear (int speed=-1)
 Focus Control: Set focus nearer NB: Focus Mode is set to Manual Focus.
bool CAM_FocusDirect (int pos)
 Set focus directly to a position NB: Focus Mode is set to Manual Focus.
bool CAM_FocusMode (FocusMode mode, int limit=0)
 Set Focus Mode of the camera.
void CAM_AFSensitivity (AFSensitivity mode)
 change AF Sensitivity settings
void CAM_AFMode (AFMode mode, int time, int interval)
 change AF Mode settings
void CAM_Initialize (InitializationMode mode)
 Initializes the Camera To avoid error from continuous 24 hour AF mode usage, daily initialization of lens system using the CAM_Initialize command is recommended.
void CAM_WB (WBMode mode)
 change White Balance settings
void CAM_RGain (GainMode mode, int gain)
 Manual control of R Gain.
void CAM_BGain (GainMode mode, int gain)
 Manual control of B Gain.
void CAM_AE (AEMode mode)
 Set Auto Exposure mode of the camera.
void CAM_AutoSlowShutter (bool on)
 Turn Auto Slow Shutter on or off.
void CAM_Shutter (ChangeParam cp, int data=0)
 Changes the shutter parameters.
void CAM_Iris (ChangeParam cp, int data=0)
 Set the iris The iris can be set freely by the user to 18 steps between F1.4 and Close This has only effects if the AE Mode is set to AEManual, AEIris.
void CAM_Gain (ChangeParam cp, int pos=0)
 Set Gain This function has only effects, if AEMode is set to AEManual.
void CAM_Bright (ChangeParam cp, int data=0)
 Change the bright control This function has only effects if AE Mode is set to AEBright The bright control function adjusts both the gain and the iris using an internal algorithm according to a brightness level freely set by teh user.
void CAM_ExpComp (bool on)
 Turn on or off Exposure Compensation Exposure compensation is a function which offsets the internal reference brightness level used in the AE mode by steps of 1.5 dB.
void CAM_SetExpComp (ChangeParam cp, int data=0)
 Sets the Exposure Compensation.
void CAM_BackLight (bool on)
 Turns Back Light Compensation on or off.
void CAM_SpotAE (bool on)
 Turns on or of Spot AE Mode.
bool CAM_SetSpotAE (int X, int Y)
 Set the spot for SpotAE A range of 16 blocks vertically and 16 blocks horizontally can be designated for the spot.
void CAM_Aperture (ChangeParam cp, int data=0)
 Set Aperture Control Aperture control is a function which adjusts the enhancement of the edges of objects in the picture.
void CAM_LR_Reverse (bool on)
 Reverse the video output from the camera hrozontally.
void CAM_Freeze (bool on)
 Freeze image.
void CAM_PictureEffect (PictureEffect pe)
 Set Picture Effect.
void CAM_ICR (bool on)
 Turns the ICR (IR Cut-Removable) Mode off or on.
void CAM_AutoICR (bool on)
 Turns the Auto-ICR (IR Cut-Removable) Mode off or on.
void CAM_Stabilizer (bool on)
bool CAM_Memory_Reset (int presetPosition)
bool CAM_Memory_Set (int presetPosition)
bool CAM_Memory_Recall (int presetPosition)
void CAM_CUSTOM_Set (void)
void CAM_CUSTOM_Reset (void)
void PanTiltAutoSpeed (bool on)
 turn automatic Pan/Tilter Speed control on or off
void PanTiltDrive (Direction dir, int panSpeed=0xFF, int tiltSpeed=0xFF)
 use Pan-Tilt drive
void PanTiltAbsolutePosition (int panSpeed, int tiltSpeed, int panPos, int tiltPos)
void PanTiltRelativePosition (int panSpeed, int tiltSpeed, int panPos, int tiltPos)
bool PanTiltGotoPreset (int pos, int panSpeed, int tiltSpeed)
 Go to pre-set position.
virtual std::ostream & operator<< (std::ostream &out)
 adds a string representation of the current ViscaCommand to the ostream

Static Public Member Functions

static std::string ViscaToString (const ViscaCommand &vc)
 converts ViscaCommand into a string

Static Public Attributes

static const int Head = 0x81
 header
static const int Term = 0xFF
 terminator
static const bool ON = true
static const bool OFF = false

Protected Member Functions

virtual void initCommand (Type t, Category c)
 initialises ViscaCommand This function is invoked by every ViscaControl command it clears the old ViscaCommand, puts the header, the type and the category into the ViscaCommand
virtual void termCommand ()
 adds terminator to the Visca Command This function is invoked by every ViscaControl command
virtual void sendCommand ()
 This function is invoked by every ViscaControl command after termCommand().

Protected Attributes

ViscaCommand mCmd


Member Enumeration Documentation

enum prip::ViscaControl::AEMode

Enumerator:
AEAuto  Automatic Exposure Mode - Auto Iris and Gain, Fixed Shutter Speed (NTSC 1/60sec, PAL 1/50sec).
AEManual  Manual Control Mode - Variable Shutter, Iris and Gain.
AEShutter 
AEIris  Iris Priority Automatic Exposure Mode - Variable Iris (F1.4 to Close 18 steps), Auto Gain and Shutter speed.
AEBright  Variable Iris and Gain (Close to F1.6, 17 steps at 0dB: F1.4, 15 steps from 0 to 28dB).

Definition at line 625 of file IPCamera.h.

enum prip::ViscaControl::AFMode

list of possible AF Movement modes

Enumerator:
AFNormal  This is the normal mode for AF operations.
AFInterval  The mode used for AF movements carried out at defined intervals.

The time intervals for AF movements and for the timing to the stops can be set in one-second increments using the SetTime command.

AFZoomTrigger 
AFActiveInterval 

Definition at line 508 of file IPCamera.h.

enum prip::ViscaControl::AFSensitivity

list of possible AF Sensitivity Settings

Enumerator:
AFSNormal  Normal (high) AF sensitivity Reasches the highest focus speed quickly.

Use this when shooting a subject that moves frequently. Usually this is the most appropriate mode.

AFSLow  Low AF sensitivity Improves the stability of the focus.

When the lightening level is low, the AF function does not take effect, even though the brightness varies, contributing to a stable image.

Definition at line 479 of file IPCamera.h.

enum prip::ViscaControl::Category

category code

Enumerator:
CInterface 
CCamera 
CPanTilt 

Definition at line 367 of file IPCamera.h.

enum prip::ViscaControl::ChangeParam

Parameter for various change operations.

See also:
CAM_Shutter, CAM_Iris, CAM_Gain, CAM_Bright, CAM_Aperture, CAM_ExpComp
Enumerator:
CPReset 
CPUp 
CPDown 
CPDirect 

Definition at line 674 of file IPCamera.h.

enum prip::ViscaControl::Direction

Possible Directions for Pan-Tilt Drive.

See also:
PanTiltDrive
Enumerator:
Up 
Down 
Left 
Right 
UpLeft 
UpRight 
DownLeft 
DownRight 
Stop 
Home 

Definition at line 985 of file IPCamera.h.

enum prip::ViscaControl::FocusMode

Focus Mode.

Enumerator:
FMManual  Manual Focus.
FMAuto  AutoFocus.
FMSwitch  Switch between Manual and AutoFocus.
FMOnePushTrigger  One Push Trigger; when a Trigger Command is received, the lens moves to adjust the focus for the subject.

The focus lens then holds the same position until the next Trigger Command is input.

FMInfinity  Infinity mode - the lens is forcibly moved to a position suitable for an unlimited distance.
FMNearLimit  Near Limit Mode - the focus range is narrowd by excluding the unnecessary range.

Definition at line 439 of file IPCamera.h.

enum prip::ViscaControl::GainMode

list of possible gain modes

Enumerator:
GainReset 
GainUp 
GainDown 
GainDirect 

Definition at line 604 of file IPCamera.h.

enum prip::ViscaControl::InitializationMode

Enumerator:
IMLens  Lens Correction.
IMCompScan  Correction of CCD pixel blemishes.

Definition at line 531 of file IPCamera.h.

enum prip::ViscaControl::PictureEffect

Enumerator:
PEOff  no picture effects
PENegArt  Negative/Positive Reversal.
PEMonochrome  Monochrome Image.

Definition at line 918 of file IPCamera.h.

enum prip::ViscaControl::Type

type of the request - Command/Inquiry

Enumerator:
TCommand 
TInquiry 

Definition at line 364 of file IPCamera.h.

enum prip::ViscaControl::WBMode

list of possible White Balance settings

Enumerator:
WBAuto  Normal Auto Mode This mode computes the white balance value output using color information form the entire screen.

It outputs the proper value using the color temperature radiating from a black subject based on a range of values from 3000 to 7500 K

WBIndoor  Indoor mode (3200 K).
WBOutdoor  Outdoor mode (5800 K).
WBOnePushWB  One Push mode The One Push White Balance mode is a fixed white balance mode that may be automatically readjusted only at the request of the User (One Push Trigger), assuming that a white subject in correct lighting conditions and occupying more than 50% of the image is submitted to the camera.

NB: One Push White Balance data is lost when the power is turned off. If the power is turned off, reset the One Push White Balance

WBATW  Auto Tracing White Balance (2000 to 10000K).
WBManual  Manual Control Mode Manual Control of R and B gain, 256 steps each.

See also:
CAM_RGain, CAM_BGain
WBOnePushTrigger  One Push WB Trigger Mode.

Definition at line 549 of file IPCamera.h.


Member Function Documentation

void prip::ViscaControl::CAM_AE ( AEMode  mode  ) 

Set Auto Exposure mode of the camera.

Parameters:
mode new AE mode
See also:
AEMode

void prip::ViscaControl::CAM_AFMode ( AFMode  mode,
int  time,
int  interval 
)

change AF Mode settings

Parameters:
mode new AF Momement mode
time movement time
interval interval
See also:
AFMode

void prip::ViscaControl::CAM_AFSensitivity ( AFSensitivity  mode  ) 

change AF Sensitivity settings

Parameters:
mode new AF sensitivtiy setting
See also:
AFSensitivity

void prip::ViscaControl::CAM_Aperture ( ChangeParam  cp,
int  data = 0 
)

Set Aperture Control Aperture control is a function which adjusts the enhancement of the edges of objects in the picture.

There are 16 levels of adjustment starting from "no enhancement". When shooting text, this control may help by making the text sharpe

Parameters:
cp Change Parameter (up, down, reset, direct)
data aperture level (0x0 - 0xF)

void prip::ViscaControl::CAM_AutoICR ( bool  on  ) 

Turns the Auto-ICR (IR Cut-Removable) Mode off or on.

An infrared (IR) Cut-Filter can be disengaged from the image path for increased sensitivity in low light environments. If the Auto-ICR Mode is turned on, the ICR will automatically engage depending on the ambient light, allowing the camera to be effective in day/night environments. NB: AutoICR is available in AEAuto mode only.

Parameters:
on if true, ICR is turned on, otherwise it is turned off.
See also:
CAM_ICR

void prip::ViscaControl::CAM_AutoSlowShutter ( bool  on  ) 

Turn Auto Slow Shutter on or off.

When the Auto Slow Shutter is turned on, this ensures that the slow shutter is engaged automatically when the brightness drops. This occurs only when the AE mode is set to AEAuto.

Parameters:
on true - turn Auto Slow Shutter on
false - turn Auto Slow Shutter off (Factory setting)

void prip::ViscaControl::CAM_BackLight ( bool  on  ) 

Turns Back Light Compensation on or off.

When the background of the subject is too bright, or when the subject is too dark due to shooting in the AE mode, back light compensation will make the subject appear clearer.

void prip::ViscaControl::CAM_BGain ( GainMode  mode,
int  gain 
)

Manual control of B Gain.

Parameters:
mode Gain mode
gain value to which gain is set this parameter is only used, if mode is set to GainDirect

void prip::ViscaControl::CAM_Bright ( ChangeParam  cp,
int  data = 0 
)

Change the bright control This function has only effects if AE Mode is set to AEBright The bright control function adjusts both the gain and the iris using an internal algorithm according to a brightness level freely set by teh user.

Exposure is controlled by gain when dark and by iris when bright. As both gain and iris are fixed, this mode is used when exposing at a fixed camera sensitivity. When switching from AEAuto or AEShutter to Bright Mode, the current status will be retained for a short period of time. Only when AE mode is set to AEAuto or AEShutter, the user can switch to AEBright. When switching form AEShutter mode to the AEBright mode, the shutter speed set in the AEShutter mode is maintained.

Parameters:
cp Change Parameter (up, down, reset, direct)
data bright data, this parameter is only used if cp is set to direct. Possible values for data are:
DataIrisGainDataIrisGain
0x1FF1.428 dB0x0FF2.00 dB
0x1EF1.426 dB0x0EF2.40 dB
0x1DF1.424 dB0x0DF2.80 dB
0x1CF1.422 dB0x0CF3.40 dB
0x1BF1.420 dB0x0BF4.00 dB
0x1AF1.418 dB0x0AF4.80 dB
0x19F1.416 dB0x09F5.60 dB
0x18F1.414 dB0x08F6.80 dB
0x17F1.412 dB0x07F8.00 dB
0x16F1.410 dB0x06F9.60 dB
0x15F1.48 dB0x05F110 dB
0x14F1.46 dB0x04F140 dB
0x13F1.44 dB0x03F160 dB
0x12F1.42 dB0x02F190 dB
0x11F1.40 dB0x01F220 dB
0x10F1.60 dB0x00CLOSE0 dB
See also:
AEMode, CAM_AE

void prip::ViscaControl::CAM_CUSTOM_Reset ( void   ) 

void prip::ViscaControl::CAM_CUSTOM_Set ( void   ) 

void prip::ViscaControl::CAM_ExpComp ( bool  on  ) 

Turn on or off Exposure Compensation Exposure compensation is a function which offsets the internal reference brightness level used in the AE mode by steps of 1.5 dB.

Parameters:
on if true, Exposure Compensation is turned on, otherwise it is turned off
See also:
CAM_SetExpComp

bool prip::ViscaControl::CAM_FocusDirect ( int  pos  ) 

Set focus directly to a position NB: Focus Mode is set to Manual Focus.

Parameters:
pos position of the focus (0x1000 (inf.) - 0xC000 (near))
Returns:
true, if pos is within the limits, false, otherwise (NB: if the parameter is not within the limits, sendCommand() is not invoked

void prip::ViscaControl::CAM_FocusFar ( int  speed = -1  ) 

Focus Control: Set focus farer NB: Focus Mode is set to Manual Focus.

Parameters:
speed if not supplied, standard speed is used

bool prip::ViscaControl::CAM_FocusMode ( FocusMode  mode,
int  limit = 0 
)

Set Focus Mode of the camera.

Parameters:
mode Focus Mode
limit this parameter specifies the limit for the Near Limit Mode it can be set in a range from 0x1000 (inf) to 0xC000 (10mm).
Returns:
false, if mode is set to FMNearLimit and limit is outside the specification (in this case sendCommand is not invoked)
true, otherwise
See also:
FocusMode, CAM_FocusNear, CAM_FocusFar, CAM_FocusStop

void prip::ViscaControl::CAM_FocusNear ( int  speed = -1  ) 

Focus Control: Set focus nearer NB: Focus Mode is set to Manual Focus.

Parameters:
speed if not supplied, standard speed is used

void prip::ViscaControl::CAM_FocusStop ( void   ) 

Focus Control: Stop Focus change.

void prip::ViscaControl::CAM_Freeze ( bool  on  ) 

Freeze image.

This function captures an image in the field memory of the camera so that this image can be output continously.

Parameters:
on if true, Freeze mode is turned on, otherwise it is turned off.

void prip::ViscaControl::CAM_Gain ( ChangeParam  cp,
int  pos = 0 
)

Set Gain This function has only effects, if AEMode is set to AEManual.

Parameters:
cp Change Parameter (up, down, reset, direct)
data bright data, this parameter is only used if cp is set to direct. Possible values:
DataSetting value
0x0F28 dB
0x0E26 dB
0x0D24 dB
0x0C22 dB
0x0B20 dB
0x0A18 dB
0x0916 dB
0x0814 dB
0x0712 dB
0x0610 dB
0x058 dB
0x046 dB
0x034 dB
0x02+2 dB
0x010 dB
0x01-3 dB
See also:
CAM_AE, AEMode

void prip::ViscaControl::CAM_ICR ( bool  on  ) 

Turns the ICR (IR Cut-Removable) Mode off or on.

An infrared (IR) Cut-Filter can be disengaged from the image path for increased sensitivity in low light environments.

Parameters:
on if true, ICR is turned on, otherwise it is turned off.
See also:
CAM_AutoICR

void prip::ViscaControl::CAM_Initialize ( InitializationMode  mode  ) 

Initializes the Camera To avoid error from continuous 24 hour AF mode usage, daily initialization of lens system using the CAM_Initialize command is recommended.

void prip::ViscaControl::CAM_Iris ( ChangeParam  cp,
int  data = 0 
)

Set the iris The iris can be set freely by the user to 18 steps between F1.4 and Close This has only effects if the AE Mode is set to AEManual, AEIris.

Parameters:
cp Change Parameter (up, down, reset, direct)
data iris data, this parameter is only used if cp is set to direct. Possible values for data are:
DataSetting valueDataSetting value
0x11F1.40x08F6.8
0x10F1.60x08F8.0
0x0FF2.00x08F9.6
0x0EF2.40x08F11
0x0DF2.80x08F14
0x0CF3.40x08F16
0x0BF4.00x08F19
0x0AF4.80x08F22
0x09F5.60x08CLOSE

void prip::ViscaControl::CAM_LR_Reverse ( bool  on  ) 

Reverse the video output from the camera hrozontally.

Parameters:
on if true, image is mirrored, otherwise not.

bool prip::ViscaControl::CAM_Memory_Recall ( int  presetPosition  ) 

bool prip::ViscaControl::CAM_Memory_Reset ( int  presetPosition  ) 

bool prip::ViscaControl::CAM_Memory_Set ( int  presetPosition  ) 

void prip::ViscaControl::CAM_PictureEffect ( PictureEffect  pe  ) 

Set Picture Effect.

Parameters:
pe Picture Effect
See also:
PictureEffect

void prip::ViscaControl::CAM_Power ( bool  on  ) 

turns Pan/Tilter Power on or off

Parameters:
on if true, Pan/Tilter is turned on else Pan/Tilter is turned off

void prip::ViscaControl::CAM_RGain ( GainMode  mode,
int  gain 
)

Manual control of R Gain.

Parameters:
mode Gain mode
gain value to which gain is set this parameter is only used, if mode is set to GainDirect

void prip::ViscaControl::CAM_SetExpComp ( ChangeParam  cp,
int  data = 0 
)

Sets the Exposure Compensation.

Parameters:
cp Change Parameter (up, down, reset, direct)
data exposure compensation data, this parameter is only used if cp is set to direct.
DataStepSetting value
0x0E710.5 dB
0x0D69 dB
0x0C57.5 dB
0x0B46 dB
0x0A34.5 dB
0x0923 dB
0x0811.5 dB
0x0700 dB
0x06-1-1.5 dB
0x05-2-3 dB
0x04-3-4.5 dB
0x03-4-6 dB
0x02-5-7.5 dB
0x01-6-9 dB
0x00-7-10.5 dB
See also:
CAM_ExpComp

bool prip::ViscaControl::CAM_SetSpotAE ( int  X,
int  Y 
)

Set the spot for SpotAE A range of 16 blocks vertically and 16 blocks horizontally can be designated for the spot.

[0x0, 0x0] defines the region in the upper left corner, [0xF, 0xF] the region in the lower right corner of the image

Parameters:
X x-coordinate of the AE spot (0x0 - 0xF)
Y y-coordinate of the AE spot (0x0 - 0xF)
Returns:
true, if the parameters are inside the specifications, false otherwise.
See also:
Cam_SpotAE

void prip::ViscaControl::CAM_Shutter ( ChangeParam  cp,
int  data = 0 
)

Changes the shutter parameters.

This has only effects if AE Mode is set to AEShutter or AEManual

Parameters:
cp Change Parameter (up, down, reset, direct)
data shutter data, this parameter is only used if cp is set to direct. Possible values for data are:
dataNTSCPAL
0x151000010000
0x1460006000
0x1340003500
0x1230002500
0x1120001750
0x1015001250
0x0F10001000
0x0E725600
0x0D500425
0x0C350300
0x0B250215
0x0A180150
0x09125120
0x08100100
0x079075
0x066050
0x053025
0x041612
0x0386
0x0243
0x01 (for AEManual only)22
0x00 (for AEManual only)11
See also:
CAM_AE, AEMode

void prip::ViscaControl::CAM_SpotAE ( bool  on  ) 

Turns on or of Spot AE Mode.

In Full Auto AE, the level for the entire screen is computed and the optimum Auto Iris and Gain levels are determined. In Spot AE, a particular section of the subject can be desiognated, and then that porrtion of the image can be weighted and a value computed so that Iris and Gain can be optimized to obtian an image. For example, in an image with a lot of movement and wit varying levels of brightness, portions without much change can be designated as such a "spot", and changes to the screen can be minimized in that area.

Parameters:
on if ture, SpotAE is turned on, otherwise it is turned off.
See also:
CAM_SetSpotAE

void prip::ViscaControl::CAM_Stabilizer ( bool  on  ) 

void prip::ViscaControl::CAM_WB ( WBMode  mode  ) 

change White Balance settings

Parameters:
mode new white balance mode
See also:
WBMode

void prip::ViscaControl::CAM_ZoomIn ( int  speed = -1  ) 

zooms in at speed speed.

Parameters:
speed 0...slow, 7...fast, if speed is <0 or >7, standard speed is used

void prip::ViscaControl::CAM_ZoomOut ( int  speed = -1  ) 

zooms out at speed speed.

Parameters:
speed 0...slow, 7...fast, if speed is <0 or >7, standard speed is used

void prip::ViscaControl::CAM_ZoomStop ( void   ) 

stops zooming

void prip::ViscaControl::CAM_ZoomTo ( int  pos  ) 

zooms to position pos.

Parameters:
pos Zoom position
Optical zoom: 0x0000(wide) - 0x4000(tele)
Digital zoom (NTSC): 0x4000(x1) - 0x7700(x25)
Digital zoom (PAL): 0x4000(x1) - 0x77C0(x25)

virtual void prip::ViscaControl::initCommand ( Type  t,
Category  c 
) [inline, protected, virtual]

initialises ViscaCommand This function is invoked by every ViscaControl command it clears the old ViscaCommand, puts the header, the type and the category into the ViscaCommand

Parameters:
t Type of the ViscaCommand (Command or Inquiry)
c Category of the Command (Interface, Camera, PanTilt)
See also:
Type, Category

Definition at line 1071 of file IPCamera.h.

virtual std::ostream& prip::ViscaControl::operator<< ( std::ostream &  out  )  [inline, virtual]

adds a string representation of the current ViscaCommand to the ostream

Parameters:
out ostream, to which the representation should be added
Returns:
ostream with added string representation of the current ViscaCommand

Definition at line 1053 of file IPCamera.h.

void prip::ViscaControl::PanTiltAbsolutePosition ( int  panSpeed,
int  tiltSpeed,
int  panPos,
int  tiltPos 
)

Parameters:
panPos Pan position (0xF670-0x0990)
tiltPos Tilt position (0xFCC4 - 0x033C)
panSpeed Pan Speed (0x00 - 0x18)
tiltSpeed Tilt speed (0x00 - 0x14)

void prip::ViscaControl::PanTiltAutoSpeed ( bool  on  ) 

turn automatic Pan/Tilter Speed control on or off

Parameters:
on if true automatic Pan/Tilter Speed control is turned on otherwise it is turned off
See also:
PanTiltDrive, PanTiltAbsolutePosition, PanTiltRelativePosition

void prip::ViscaControl::PanTiltDrive ( Direction  dir,
int  panSpeed = 0xFF,
int  tiltSpeed = 0xFF 
)

use Pan-Tilt drive

Parameters:
dir Direction
panSpeed Pan Speed (0x00 - 0x18)
tiltSpeed Tilt speed (0x00 - 0x14)
N.B.: if panSpeed or tiltSpeed is outside the specified range, PanTilt-Autospeed will be used instead

See also:
Direction, PanTiltAutoSpeed

bool prip::ViscaControl::PanTiltGotoPreset ( int  pos,
int  panSpeed,
int  tiltSpeed 
)

Go to pre-set position.

Parameters:
pos pre-set position (0x0 - 0xF)
panSpeed Pan Speed (0x05 - 0x18)
tiltSpeed Tilt speed (0x05 - 0x14)
Returns:
false, if parameters are outside the specification
true, otherwise
NB: if false is returned, sendComamnd is not invoked.
See also:
sendCommand

void prip::ViscaControl::PanTiltRelativePosition ( int  panSpeed,
int  tiltSpeed,
int  panPos,
int  tiltPos 
)

Parameters:
panPos Pan position (0xECE0-0x1320)
tiltPos Tilt position (0xF988 - 0x0678)
panSpeed Pan Speed (0x00 - 0x18)
tiltSpeed Tilt speed (0x00 - 0x14)

virtual void prip::ViscaControl::sendCommand ( void   )  [inline, protected, virtual]

This function is invoked by every ViscaControl command after termCommand().

It is supposed to be overwritten by subclasses to actually send the command to the VISCA-able Camera e.g. via serial port or IP connection.

See also:
termCommand

Reimplemented in prip::ViscaIP.

Definition at line 1096 of file IPCamera.h.

virtual void prip::ViscaControl::termCommand (  )  [inline, protected, virtual]

adds terminator to the Visca Command This function is invoked by every ViscaControl command

Definition at line 1083 of file IPCamera.h.

static std::string prip::ViscaControl::ViscaToString ( const ViscaCommand vc  )  [inline, static]

converts ViscaCommand into a string

Parameters:
vc Visca Command that should be converted
Returns:
string of the hex values of vc

Definition at line 1034 of file IPCamera.h.


Member Data Documentation

const int prip::ViscaControl::Head = 0x81 [static]

header

Definition at line 355 of file IPCamera.h.

ViscaCommand prip::ViscaControl::mCmd [protected]

Definition at line 1060 of file IPCamera.h.

const bool prip::ViscaControl::OFF = false [static]

Definition at line 361 of file IPCamera.h.

const bool prip::ViscaControl::ON = true [static]

Definition at line 360 of file IPCamera.h.

const int prip::ViscaControl::Term = 0xFF [static]

terminator

Definition at line 358 of file IPCamera.h.


The documentation for this class was generated from the following file:
Generated on Thu Nov 30 00:34:23 2006 for PRIP by  doxygen 1.4.7