Toshiba teli BU1207MG Instruction Manual page 80

Cmos camera
Table of Contents

Advertisement

// 1.Select an Image Buffer mode
uint32_t
Cam_WriteReg(s_hCam, 0x20307C, 1, &dat);
// 2.Open and Start image stream.
// 2.1.Set Trigger mode
// 2.2.Open Stream
| MEM_COMMIT, PAGE_EXECUTE_READWRITE);
// 2.3.Stream Start
// 2.4.Execute Software Trigger
// 3.Read the number of frames in Image Buffer.
uint32_t count = 0;
while(count==0)
{
}
// 4.Read Image from Image Buffer. AcquisitionCommand = 10 : Image Buffer Read
dat = 10;
Cam_WriteReg(s_hCam, 0x20303C, 1, &dat);
// 5.Receive Image from Image Buffer
// 6.Stop and Close image stream.
// 6.1.Stream Stop
// 6.2.Close Stream
Please refer to [Camera functions] in [TeliCamAPI Library manual] for more detail.
● Note
The maximum number of frames storable depends on the image size. (maximum 256MByte.)
The number of frames to be transferred by 'ImageBufferRead' command is determined by
'AcquisitionFrameCount'.
Changing 'ImageBufferMode' register value is invalid during image stream data output.
Copyright © 2020 Toshiba Teli Corporation, All rights reserved.
dat = 1;
SetCamTriggerMode(s_hCam, true);
SetCamTriggerSource(s_hCam, CAM_TRIGGER_SOFTWARE);
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
Strm_Start(s_hStrm);
ExecuteCamSoftwareTrigger(s_hCam);
Cam_ReadReg(s_hCam, 0x20309C, 1, &count);
uint32_t uiSize = s_uiImgBufSize;
WaitForSingleObject(s_hStrmEvt, 1000);
Strm_ReadCurrentImage(s_hStrm, s_pucImgBuf, &uiSize, NULL);
Strm_Stop(s_hStrm);
Strm_Close(s_hStrm);
CloseHandle(s_hStrmEvt);
VirtualFree(s_pucImgBuf, 0, MEM_RELEASE);
79 / 161
D4279014C
http://www.toshiba-teli.co.jp/en/index.htm

Advertisement

Table of Contents
loading

This manual is also suitable for:

Bu seriesBu1207mcgBu1207mcf

Table of Contents