Hi All,
I am facing a quite strange issue while capturing the projected patterns. There is no issue if I project and capture the patterns by using GUI. but when i tried to use the source code of the GUI. I am facing a strange issue. Sometimes it works fine but sometimes i face two types of issue which are explained below.
- I used to project 18 patterns but when i capture those patterns sometimes those are correctly captured but sometimes on of the patterns got missed and instead of that i observed a blank image at the end. Why its happening ?can any one guide ?Does i am doing any mistake.Note there is no missing of frames if i do this process by using GUI.
- i want the projector should project 18-patterns when i send the command to the projector. Most of the time it works perfectly but sometime at sudden it keeps on projecting continuously.
Can anyone guide why its happening.
My c-code is as follows.Does i am doing mistake in my code ?
void main {
USB_Init();
if(USB_IsConnected())
USB_Close();
USB_Open();
LCR_SetMode(1);
LCR_SetPatternDisplayMode(0);
LCR_SetExposure_FramePeriod(17000,17000);
LCR_ClearPatLut();
LCR_SendPatLut();
/*
Camera initializtion Code
*/
LCR_PatternDisplay(2);
for(int i=0; i<18; i++) {
cam.RetrieveBuffer(&image);
sprintf( filename, "capture%d.bmp", i);
image.Save( filename );
}
LCR_PatternDisplay(0);
}//End of main
The whole set is like this first i set the parameters in the GUI e.g Pattern Sequence and all other parameters.then i close that GUI and run my program.