<< Click to Display Table of Contents > 

Client Control Interface Manual > Other > Background Camera Image

Background Camera Image
Previous pageReturn to chapter overviewNext page

Background Image Enable

Background Image Source

Calibration Background Points

Camera Count

Camera Name

Camera Frames per Second

Crop Image to Working Area

Crop Source

Entity Transparency

From File Image Path

From File Update Enable

From File Update Period

 

Background Image Enable

Set

Get

DLL Function,

int CCI_Return = ScSetLongValue(int Value_Type, int BG_Img_Enable)

int BG_Img_Enable = ScGetLongValue(int Value_Type)

ASCII Function

int CCI_Return = ScCciSetLongValue(int Value_Type, int BG_Img_Enable)

int BG_Img_Enable = ScCciGetLongValue(int Value_Type)

Description

Set or get the background image enable state (checkbox in the background camera toolbar).

Value_Type

Type: int

ID:

Location: ScComSAMLightClientCtrlValueTypes

scComSAMLightClientCtrlLongValueTypeEnableBackgroundImage

122

BG_Img_Enable

Type: int

Unit: none

0: Disable background image.

1: Enable background image.

CCI_Return

Type: int

CCI error number, see error list.

Notes

Direct3D must be enabled.

C# Example: Disable background image:

 

int CCI_Return = cci.ScSetLongValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeEnableBackgroundImage, 0 );

C# Example: Get current background image enable state:

 

int BG_Img_Enable = cci.ScGetLongValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeEnableBackgroundImage );

Table 326: Background Image Enable

Background Image Source

Set

Get

DLL Function,

int CCI_Return = ScSetLongValue(int Value_Type, int Image_Source)

int Image_Source = ScGetLongValue(int Value_Type)

ASCII Function

int CCI_Return = ScCciSetLongValue(int Value_Type, int Image_Source)

int Image_Source = ScCciGetLongValue(int Value_Type)

Description

Set or get the background image source.

Value_Type

Type: int

ID:

Location: ScComSAMLightClientCtrlValueTypes

scComSAMLightClientCtrlLongValueTypeBackgroundImage

140

Image_Source

Type: int

Unit: none

0: Disable background image.

1: Image from file.

2: Image from camera.

CCI_Return

Type: int

CCI error number, see error list.

Notes

-

C# Example: Set background image from camera:

 

int CCI_Return = cci.ScSetLongValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeBackgroundImage, 2 );

C# Example: Get background image status:

 

int Image_Source = cci.ScGetLongValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeBackgroundImage );

Table 327: Background Image Source

Calibration Background Points

Set

Get

DLL Function

int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function

int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description

Set or get Calibration Background Points. Those are defined via the DoublePara1-8.

Top Left X: DoublePara1

Top Left Y: DoublePara2

Top Right X: DoublePara3

Top Right Y: DoublePara4

Bottom Left X: DoublePara5

Bottom Left Y: DoublePara6

Bottom Right X: DoublePara7

Bottom Right Y: DoublePara8

Cmd_ID

Type: int

ID:

Location: ScComSAMLightClientCtrlExecCommandConstants

scComSAMLightClientCtrlExecCommandSetBackgroundPoints

71

Set the predefined background points. The calibration background points have to be set via DoublePara1-8 in advance.

scComSAMLightClientCtrlExecCommandGetBackgroundPoints

73

Get the current calibration background points. After this command the DoublePara1-8 are filled and have to be get to read out the values.

CCI_Return

Type: int

CCI return number, see error list.

Notes

For setting it is necessary first to enter the double para values and then the exec command.

UpdateViewNow is required to directly see the changes.

For getting the exec command is used first.

C# Example: Set calibration background points top left (-50.0, 50.0), top right (50.0, 50.0), bottom left (-50.0, -50.0) and bottom right (-50.0, 50.0):

 

int CCI_Return_01 = cci.ScSetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara1, -50.0 );

int CCI_Return_02 = cci.ScSetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara2, 50.0 );

int CCI_Return_03 = cci.ScSetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara3, 50.0 );

int CCI_Return_04 = cci.ScSetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara4, 50.0 );

int CCI_Return_05 = cci.ScSetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara5, -50.0 );

int CCI_Return_06 = cci.ScSetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara6, -50.0 );

int CCI_Return_07 = cci.ScSetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara7, 50.0 );

int CCI_Return_08 = cci.ScSetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara8, -50.0 );

int CCI_Return_09 = cci.ScExecCommand( ( int )ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandSetBackgroundPoints );

int CCI_Return_10 = cci.ScExecCommand( ( int )ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandUpdateViewNow );

C# Example: Get calibration background points:

 

int CCI_Return = cci.ScExecCommand( ( int )ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandGetBackgroundPoints );

double Top_Left_X = cci.ScGetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara1 );

double Top_Left_Y = cci.ScGetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara2 );

double Top_Right_X = cci.ScGetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara3 );

double Top_Right_Y = cci.ScGetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara4 );

double Bottom_Left_X = cci.ScGetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara5 );

double Bottom_Left_Y = cci.ScGetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara6 );

double Bottom_Right_X = cci.ScGetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara7 );

double Bottom_Right_Y = cci.ScGetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara8 );

Table 328: Calibration Background Points

Camera Count

☐  Set

Get

DLL Function,

int Camera_Count = ScGetLongValue(int Value_Type)

ASCII Function

int Camera_Count = ScCciGetLongValue(int Value_Type)

Description

Get the count of cameras connected to the PC.

Value_Type

Type: int

ID:

Location: ScComSAMLightClientCtrlValueTypes

scComSAMLightClientCtrlLongValueTypeGetCameraCount

138

Camera_Count

Type: int

Unit: none

Get the camera count.

CCI_Return

Type: int

CCI error number, see error list.

Notes

-

C# Example: Get Camera Count:

 

int Camera_Count = cci.ScGetLongValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeGetCameraCount );

Table 329: Camera Count

Camera Name

Set

Get

DLL Function

int CCI_Return = ScSetStringValue(int Value_Type, string Camera_Name)

int CCI_Return = ScGetStringValue(int Value_Type, ref string Camera_Name)

ASCII Function

int CCI_Return = ScCciSetStringValue(int Value_Type, string Camera_Name)

string Camera_Name = ScCciGetStringValue(int Value_Type)

Description

Get current camera name, get list of all camera sources or set camera source by name.

Value_Type

Type: int

ID:

Location: ScComSAMLightClientCtrlValueTypes

scComSAMLightClientCtrlStringValueTypeCurrentCameraName

39

Get current camera name.

scComSAMLightClientCtrlStringValueTypeCameraName

40000 - 40099

Get list of all camera sources or set camera source by name.

Camera_Name

Type: string

Unit: none

The name of the camera.

CCI_Return

Type: int

CCI error number, see error list.

Notes

-

C# Example: Get current camera name:

 

string Current_Camera_Name = "";

int CCI_Return = cci.ScGetStringValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeCurrentCameraName, ref Current_Camera_Name );

C# Example: Get list of all camera sources:

 

List<string> Camera_Name_List = new List<string>();

int Camera_Count = cci.ScGetLongValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeGetCameraCount );

for( int i = 0; i < Camera_Count; i++ )

{

  string Camera_Name = "";

  int CCI_Return = cci.ScGetStringValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeCameraName + i, ref Camera_Name );

   Camera_Name_List.Add( Camera_Name );

}

C# Example: Set camera source to "DSHOW: OBS Virtual Camera":

 

int CCI_Return = cci.ScSetStringValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeCameraName, "DSHOW: OBS Virtual Camera" );

Table 330: Camera Name

Camera Frames per Second

Set

Get

DLL Function

int CCI_Return = ScSetDoubleValue(int Value_Type, double Max_Frames)

double Max_Frames = ScGetDoubleValue(int Value_Type)

ASCII Function

int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Max_Frames)

double Max_Frames = ScCciGetDoubleValue(int Value_Type)

Description

Set or get the maximal frames per second for the background camera.

Value_Type

Type: int

ID:

Location: ScComSAMLightClientCtrlValueTypes

scComSAMLightClientCtrlDoubleValueTypeBackgroundImageWebcamMaxFramesPerSecond

153

Max_Frames

Type: double

Unit: [Hz]

Frames per second value.

CCI_Return

Type: int

CCI return number, see error list.

Notes

-

C# Example: Set maximal frames per second to 15.0:

 

int CCI_Return = cci.ScSetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeBackgroundImageWebcamMaxFramesPerSecond, 15.0 );

C# Example: Get maximum frames per second:

 

int Max_Frames = cci.ScSetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeBackgroundImageWebcamMaxFramesPerSecond );

Table 331: Camera Frames per Second

Crop Image to Working Area

Set

Get

DLL Function,

int CCI_Return = ScSetLongValue(int Value_Type, int Crop_Image_WA)

int Crop_Image_WA = ScGetLongValue(int Value_Type)

ASCII Function

int CCI_Return = ScCciSetLongValue(int Value_Type, int Crop_Image_WA)

int Crop_Image_WA = ScCciGetLongValue(int Value_Type)

Description

Set or get the Crop Image to Working Area state.

Value_Type

Type: int

ID:

Location: ScComSAMLightClientCtrlValueTypes

scComSAMLightClientCtrlLongValueTypeBackgroundImageCrop

142

Crop_Image_WA

Type: int

Unit: none

0: Disable Crop Image to Working Area.

1: Enable Crop Image to Working Area.

CCI_Return

Type: int

CCI error number, see error list.

Notes

UpdateViewNow is required to directly see the changes.

C# Example: Disable Crop Image to Working Area:

 

int CCI_Return_01 = cci.ScSetLongValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeBackgroundImageCrop, 0 );

int CCI_Return_02 = cci.ScExecCommand( ( int )ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandUpdateViewNow );

C# Example: Get current Crop Image to Working Area state:

 

int Crop_Image_WA = cci.ScGetLongValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeBackgroundImageCrop );

Table 332: Crop Image to Working Area

Crop Source

Set

Get

DLL Function

int CCI_Return = ScExecCommand(int Cmd_ID)

ASCII Function

int CCI_Return = ScCciExecCommand(int Cmd_ID)

Description

Set or get crop source values in %. Those are defined via the DoublePara1-4.

Top: DoublePara1

Left: DoublePara2

Bottom: DoublePara3

Right: DoublePara4

Cmd_ID

Type: int

ID:

Location: ScComSAMLightClientCtrlExecCommandConstants

scComSAMLightClientCtrlExecCommandSetCrop

70

Set the predefined crop values. The crop values have to be set via DoublePara1-4 in advance.

scComSAMLightClientCtrlExecCommandGetCrop

72

Get the current crop values. After this command the DoublePara1-4 are filled and have to be get to read out the values.

CCI_Return

Type: int

CCI return number, see error list.

Notes

For setting it is necessary first to enter the double para values and then the exec command.

UpdateViewNow is required to directly see the changes.

For getting the exec command is used first.

C# Example: Set crop source to top 10.0%, left 20.0%, bottom 30.0% and right 40.0%:

 

int CCI_Return_01 = cci.ScSetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara1, 10.0 );

int CCI_Return_02 = cci.ScSetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara2, 20.0 );

int CCI_Return_03 = cci.ScSetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara3, 30.0 );

int CCI_Return_04 = cci.ScSetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara4, 40.0 );

int CCI_Return_05 = cci.ScExecCommand( ( int )ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandSetCrop );

int CCI_Return_06 = cci.ScExecCommand( ( int )ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandUpdateViewNow );

C# Example: Get crop source values:

 

int CCI_Return = cci.ScExecCommand( ( int )ScComSAMLightClientCtrlExecCommandConstants.scComSAMLightClientCtrlExecCommandGetCrop );

double Crop_Top = cci.ScGetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara1 );

double Crop_Left = cci.ScGetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara2 );

double Crop_Bottom = cci.ScGetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara3 );

double Crop_Right = cci.ScGetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara4 );

Table 333: Crop Source

Entity Transparency

Set

Get

DLL Function,

int CCI_Return = ScSetLongValue(int Value_Type, int Entity_Transparency)

int Entity_Transparency = ScGetLongValue(int Value_Type)

ASCII Function

int CCI_Return = ScCciSetLongValue(int Value_Type, int Entity_Transparency)

int Entity_Transparency = ScCciGetLongValue(int Value_Type)

Description

Set or get the Alpha Entity Transparency.

Value_Type

Type: int

ID:

Location: ScComSAMLightClientCtrlValueTypes

scComSAMLightClientCtrlLongValueTypeEntityTransparency

144

Entity_Transparency

Type: int

Unit: %

Entity Transparency in range [0, 80] %.

CCI_Return

Type: int

CCI error number, see error list.

Notes

-

C# Example: Set Entity Transparency to 30:

 

int CCI_Return = cci.ScSetLongValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeEntityTransparency, 30 );

C# Example: Get Entity Transparency:

 

int Entity_Transparency = cci.ScGetLongValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeEntityTransparency );

Table 334: Entity Transparency

From File Image Path

Set

Get

DLL Function

int CCI_Return = ScSetStringValue(int Value_Type, string Image_Path)

int CCI_Return = ScGetStringValue(int Value_Type, ref string Image_Path)

ASCII Function

int CCI_Return = ScCciSetStringValue(int Value_Type, string Image_Path)

string Image_Path = ScCciGetStringValue(int Value_Type)

Description

Set background image path.

Value_Type

Type: int

ID:

Location: ScComSAMLightClientCtrlValueTypes

scComSAMLightClientCtrlStringValueTypeBackgroundImagePath

27

Image_Path

Type: string

Unit: none

Path to the source image.

CCI_Return

Type: int

CCI error number, see error list.

Notes

This command also sets the image source to image from file.

C# Example: Set background image path to "F:\clouds.jpg":

 

int CCI_Return = cci.ScSetStringValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeBmpAlphaBlendPathBmp, @"F:\clouds.jpg" );

C# Example: Get background image path:

 

string Image_Path = "";

int CCI_Return = cci.ScGetStringValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlStringValueTypeBackgroundImagePath, ref Image_Path );

Table 335: From File Image Path

From File Update Enable

Set

Get

DLL Function,

int CCI_Return = ScSetLongValue(int Value_Type, int Image_Update)

int Image_Update = ScGetLongValue(int Value_Type)

ASCII Function

int CCI_Return = ScCciSetLongValue(int Value_Type, int Image_Update)

int Image_Update = ScCciGetLongValue(int Value_Type)

Description

Set or get the background image from file update enable state.

Value_Type

Type: int

ID:

Location: ScComSAMLightClientCtrlValueTypes

scComSAMLightClientCtrlLongValueTypeImageFromFileUpdate

141

Image_Update

Type: int

Unit: none

0: Disable Update.

1: Enable Update.

CCI_Return

Type: int

CCI error number, see error list.

Notes

-

C# Example: Enable background image from file update:

 

int CCI_Return = cci.ScSetLongValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeImageFromFileUpdate, 1 );

C# Example: Get background image from file update status:

 

int Image_Update = cci.ScGetLongValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeImageFromFileUpdate );

Table 336: From File Update Enable

From File Update Period

Set

Get

DLL Function,

int CCI_Return = ScSetLongValue(int Value_Type, int Update_Period)

int Update_Period = ScGetLongValue(int Value_Type)

ASCII Function

int CCI_Return = ScCciSetLongValue(int Value_Type, int Update_Period)

int Update_Period = ScCciGetLongValue(int Value_Type)

Description

Set or get the update period for file integration as background image in ms.

Value_Type

Type: int

ID:

Location: ScComSAMLightClientCtrlValueTypes

scComSAMLightClientCtrlLongValueTypeBackgroundImageFromFileUpdateInMs

139

Update_Period

Type: int

Unit: [ms]

Update rate in ms.

CCI_Return

Type: int

CCI error number, see error list.

Notes

UpdateViewNow is required to directly see the changes.

C# Example: Set update period to 1000 ms:

 

int CCI_Return = cci.ScSetLongValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeBackgroundImageFromFileUpdateInMs, 1000 );

C# Example: Get current update period:

 

int Update_Period = cci.ScGetLongValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlLongValueTypeBackgroundImageFromFileUpdateInMs);

Table 337: From File Update Period