92 / 179
Copyright © 2017 TOSHIBA TELI CORPORATION, All rights reserved.
http://www.toshiba-teli.co.jp/en/
D4267042B
uint32_t dat;
// 1. Select a trigger mode by 'TriggerMode'.
dat = 1;
Cam_WriteReg(s_hCam, 0x20703C, 1, &dat); // TriggerMode = On
// 2. Select a trigger sequence of random trigger shutter by 'TriggerSequence'.
dat = 6;
Cam_WriteReg(s_hCam, 0x20705C, 1, &dat); // TriggerSequence6 (Bulk mode)
// 3. Select a trigger source of random trigger shutter by 'TriggerSource'.
dat = 64;
Cam_WriteReg(s_hCam, 0x20707C, 1, &dat); // Software
// 4.Select a trigger activation of hardware trigger by 'LineInverterAll'.
// -- not applicable for Software Trigger
// 5.Set the number of frames to exposure in Bulk mode by
'TriggerAdditionalParameter'.
dat = 3;
Cam_WriteReg(s_hCam, 0x20709C, 1, &dat); // 3 frames
// 6.Set a trigger delay by 'TriggerDelay'.
// TriggerDelay = 1000.0us (Raw value = 60000)
dat = 60000;
Cam_WriteReg(s_hCam, 0x2070BC, 1, &dat); // 1ms
// 7.Open and Start image stream.
// 7.1.Open Stream
s_hStrmEvt = CreateEvent(NULL, FALSE, FALSE, NULL);
Strm_OpenSimple(s_hCam, &s_hStrm, &s_uiImgBufSize, s_hStrmEvt);
s_pucImgBuf = (uint8_t *)VirtualAlloc(NULL, s_uiImgBufSize, MEM_RESERVE
| MEM_COMMIT, PAGE_EXECUTE_READWRITE);
// 7.2.Stream Start
Strm_Start(s_hStrm);
// 8.Execute software trigger in SoftwareTrigger mode by 'SoftwareTrigger'.
dat = 8;
Cam_WriteReg(s_hCam, 0x2070DC, 1, &dat); // SoftwareTrigger
// 9.Receive Image
uint32_t uiSize = s_uiImgBufSize;
CAM_IMAGE_INFO sImageInfo;
for(int i=0; i<3; i++)
{
WaitForSingleObject(s_hStrmEvt, 1000);
Strm_ReadCurrentImage(s_hStrm, s_pucImgBuf, &uiSize, &sImageInfo);
}
// 10.Stop and Close image stream.
// 10.1.Stream Stop
Strm_Stop(s_hStrm);
// 10.2.Close Stream
Strm_Close(s_hStrm);
CloseHandle(s_hStrmEvt);
VirtualFree(s_pucImgBuf, 0, MEM_RELEASE);
Please refer to [Camera functions] in [TeliCamAPI Library manual] for more detail.