158 / 177
Copyright © 2018 - 2020 Toshiba Teli Corporation, All rights reserved.
https://www.toshiba-teli.co.jp/en/
DAA00195C
Register access API
Control DPC by accessing IIDC2 registers directly.
API name
Description
Cam_ReadReg
Read register value
Cam_WriteReg
Write register value
DPC
1. Set the coordinates of defective pixels.
Write to ‘Value[index][0]’ and ‘Value[index][1]’ field of ‘DPCCoord’ register.
The first index of ‘Value’ register indicates defective pixel number.
The second index of [0] and [1] correspond to X and Y coordinates.
2. Sets the number of pixels to correct.
Write to ‘Value’ field of ‘DPCNumber’ register.
3. Sets the activation of DPC function.
Write [1] to ‘Value’ field of ‘DPCEnable’ register.
// 1.Set the coordinates of defective pixels.
uint32_t entry[2][2] = {{100,200},{150,300}}; // {x.y}
uint32_t number;
uint64_t addr = 0x400000;
for(number=0; number<2; +, addr+= 0x8)
{
Cam_WriteReg(s_hCam, addr , 1, &entry[number][0]);
Cam_WriteReg(s_hCam, addr+0x4, 1, &entry[number][1]);
}
// 2.Sets the number of pixels to correct.
Cam_WriteReg(s_hCam, 0x21F2BC, 1, &number);
// 3.Set the activation of DPC function.
uint32_t dat = 1;
Cam_WriteReg(s_hCam, 0x21F29C, 1, &dat);
Please refer to [Camera functions] in [TeliCamAPI Library manual] for more detail.
Minimum/Maximum Value
DPCNumber
DPCIndex
Minimum
0
0
Maximum
256
255
DPCEntryX
DPCEntryY
Minimum
0
0
Maximum
WidthMax-1
HeightMax-1