152 / 172
Copyright © 2019 Toshiba Teli Corpotration, All rights reserved.
http://www.toshiba-teli.co.jp/en/
D4289451A
● Control with TeliCamSDK
GenICam function API
Control DPC using GenICam API.
DPC
1. Set the coordinates of defective pixels by ‘DPCIndex’, ‘DPCEntryX’ and ‘DPCEntryY’.
2. Sets the number of pixels to correct to ‘DPCNumber’.
3. Sets the activation of DPC function by ‘DPCEnable’.
Integer value and string value of Enumeration are as follows.
Integer
String
0
Off
1
On
// GenICam node handle
CAM_NODE_HANDLE hIndex = NULL;
CAM_NODE_HANDLE hEntryX = NULL;
CAM_NODE_HANDLE hEntryY = NULL;
CAM_NODE_HANDLE hNumber = NULL;
CAM_NODE_HANDLE hEnable = NULL;
// Retrieve GenICam node.
Nd_GetNode(s_hCam, "DPCIndex", &hIndex);
Nd_GetNode(s_hCam, "DPCEntryX", &hEntryX);
Nd_GetNode(s_hCam, "DPCEntryY", &hEntryY);
Nd_GetNode(s_hCam, "DPCNumber", &hNumber);
Nd_GetNode(s_hCam, "DPCEnable", &hEnable);
int64_t entry[2][2] = {{100,200},{150,300}}; // {x.y}
int64_t number;
for(number=0; number<2; +)
{
// 1.Set the coordinates of defective pixels by 'DPCIndex', 'DPCEntryX' and
'DPCEntryY'.
Nd_SetIntValue(s_hCam, hIndex, number); // 0 origin
Nd_SetIntValue(s_hCam, hEntryX, entry[number][0]);
Nd_SetIntValue(s_hCam, hEntryY, entry[number][1]);
}
// 2.Sets the number of pixels to correct to 'DPCNumber'.
Nd_SetIntValue(s_hCam, hNumber, number); // 2 pixels are to be corrected.
// 3.Sets the activation of DPC function by 'DPCEnable'.
Nd_SetEnumStrValue(s_hCam, hEnable, "On");
Please refer to [INode functions], [IInteger node functions] and [IEnumeration node functions] in
[TeliCamAPI Library manual] for more detail.