大家好!我根据DLPC350的API函数在windows平台下进行二次开发,通过光机投射系列图,并触发相机进行同步拍照。但是出现了一个问题,每次投射系列图,相机只被触发了一次,仅仅捕捉到了投射的第一张图片,这是什么原因咧?我的代码如下。(我用DLP4500的控制软件却可以正常触发相机!)
-----------------------------
//初始化
DLPC350_USB_Init();
DLPC350_USB_Open();
if (!DLPC350_USB_IsConnected()) {
return -1;
}
//显示设置
DLPC350_SetPowerMode(false);
DLPC350_SetMode(true);
DLPC350_PatternDisplay(0);
DLPC350_SetPatternDisplayMode(false);
//图片序列设置
const int numberOfPatterns = 8;
const int numberofImages = 6;
unsigned char imageIndices[numberOfPatterns];
int countr = 0;
for (int j = 0; j < numberofImages; j++) {
for (int i = 0; i < numberOfPatterns; i++) {
imageIndices[countr] = j;
if (i == -1) {
DLPC350_AddToPatLut(0, i, 1, 7, false, false, false, false);
}
else {
DLPC350_AddToPatLut(0, i, 1, 7, false, false, true, false);
}
countr++;
}
}
DLPC350_SendImageLut(imageIndices, countr);
DLPC350_SendPatLut();
DLPC350_SetPatternConfig(numberOfPatterns*numberofImages, false, numberOfPatterns*numberofImages, numberOfPatterns*numberofImages);
DLPC350_SetLongAxisImageFlip(false);
DLPC350_SetShortAxisImageFlip(true);
//曝光设置
DLPC350_ClearPatLut();
DLPC350_ClearExpLut();
DLPC350_SetPatternTriggerMode(1);
DLPC350_SetExposure_FramePeriod(80000, 90000);
//设置触发输出延时
DLPC350_SetTrigIn1Delay(1);
DLPC350_SetTrigIn2Pol(false);//rising
/*
DLPC350_SetTrigOutConfig(unsigned int trigOutNum,bool invert,unsigned int rising,unsigned int falliing)
trigOutNum:1=TRIG_OUT_1;2=TRIG_OUT_2
invert:0=active high signal,1=active low signal
rising:rising edge delay control.each bit adds 101.2ns 0xBB=0.00us
falling:falling edge delay control.
return >=0 = pass
*/
DLPC350_SetTrigOutConfig(1, false, 187, 187);
DLPC350_SetTrigOutConfig(2, false, 187, 187);
DLPC350_SetRedLEDStrobeDelay(187, 187);
DLPC350_SetGreenLEDStrobeDelay(187, 187);
DLPC350_SetBlueLEDStrobeDelay(187, 187);
DLPC350_SetLedEnables(true, false, false, false);
DLPC350_SetLEDPWMInvert(false);
DLPC350_SetLedCurrents(150, 135, 130);
DLPC350_SetLedEnables(true, true, true, true);
unsigned int status;
DLPC350_ValidatePatLutData(&status);
DLPC350_PatternDisplay(2);
std::cout << "ok..." << std::endl;
std::cin.get();
DLPC350_PatternDisplay(0);
std::this_thread::sleep_for(std::chrono::seconds(1));
DLPC350_SetPowerMode(true);
------------------------------------------------
请问是不是我代码哪里设置错误,或者哪里没有设置完全。。。恳求大神们能够解答,非常感谢!