This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Missing Patterns While Capturing

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.

  1. 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.
  2. 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.

  • Hello Muhammad Atif,

    We appreciate your effort in get going with minimal suggestion from our side in this thread http://e2e.ti.com/support/dlp__mems_micro-electro-mechanical_systems/f/924/p/364130/1279342.aspx#1279342

    Couple of things you need to be aware of 

    1. Whenever you touch any parameters wrt Pattern configuration, it is suggested that you are stopping the pattern display sequence first.

    2. Any change in pattern configuration must call for Validation Step and validated the configurations parameters not producing any error flags,

    I have updated your  c program with these two things, let us know if you are seeing inconsistent behavior -

    void main {

    unsigned int valStatus;

    USB_Init();
    if(USB_IsConnected())
    USB_Close();
    USB_Open();

    //Before changing pattern configuration make sure pattern
    //display is stopped
    LCR_PatternDisplay(0);

    LCR_SetMode(1);
    LCR_SetPatternDisplayMode(0);

    LCR_SetExposure_FramePeriod(17000,17000);

    LCR_ClearPatLut();

    LCR_SendPatLut();

    //Validate the pattern display configuration
    if(LCR_ValidatePatLutData(&valStatus))
    exit(0); //Validation command failed

    if(valStatus)
    exit(1); //Validation reporting error

    /*

    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

    Regards,

    Sanjeev