Hi Team,
Good day! I am posting this in behalf of our customer and we appreciate your assistance on this query.
Here is the full details of inquiry:
I have two cameras and one DLP3010-evm projector setup for 3D scanning purpose. In order to capture images simultaneously, I'm using the cameras in hardware trigger mode where the trigger source is projector's "Trigger Out 2". When I use Splash Pattern Mode using the "DLP EVM GUI 3.1.0.5", everything works fine as expected (please see the attached picture.)
The sent commands are listed in "Command Log". I used the list to implement a C++ program to do the same as what GUI does. The problem is, in this situation cameras do not start capturing. Here are the commands listed in Command Log:
I have used provided samples codes and API. The implementation has been attached.
#include "dlpc347x_samples.h"
#include
#include
#include
using namespace std;
int main()
{
InitConnectionAndCommandLayer();
bool Status = CYPRESS_I2C_RequestI2CBusAccess();
if (Status != true)
return -1;
DLPC34XX_ControllerDeviceId_e DeviceId = (DLPC34XX_ControllerDeviceId_e)0;
if (DLPC34XX_ReadControllerDeviceId(&DeviceId) != 0)
return -1;
uint16_t PixelsPerLine, LinesPerFrame;
if (DLPC34XX_ReadInputImageSize(&PixelsPerLine, &LinesPerFrame) != 0)
return -1;
size_t exposure_time = 793;
/// Read Validate Exposure Time
DLPC34XX_ValidateExposureTime_s valid_exposure_time;
int ret_valid_exposure = DLPC34XX_ReadValidateExposureTime(DLPC34XX_PatternMode_e::DLPC34XX_PM_SPLASH,
DLPC34XX_SequenceType_e::DLPC34XX_ST_ONE_BIT_MONO, exposure_time, &valid_exposure_time);
if (ret_valid_exposure != 0)
return -1;
/// Write Image Freeze
if (DLPC34XX_WriteImageFreeze(true) != 0)
return -1;
/// Write Trigger Out Configuration
int trigger_out2_delay = 0;
DLPC34XX_WriteTriggerOutConfiguration(
DLPC34XX_TriggerType_e::DLPC34XX_TT_TRIGGER1,
DLPC34XX_TriggerEnable_e::DLPC34XX_TE_ENABLE,
DLPC34XX_TriggerInversion_e::DLPC34XX_TI_NOT_INVERTED,
0);
if (DLPC34XX_WriteTriggerOutConfiguration(
DLPC34XX_TriggerType_e::DLPC34XX_TT_TRIGGER2,
DLPC34XX_TriggerEnable_e::DLPC34XX_TE_ENABLE,
DLPC34XX_TriggerInversion_e::DLPC34XX_TI_NOT_INVERTED,
trigger_out2_delay) != 0)
return -1;
///Write Pattern Configuration
DLPC34XX_PatternConfiguration_s pat_config;
pat_config.RedIlluminator = DLPC34XX_IlluminatorEnable_e::DLPC34XX_IE_DISABLE;
pat_config.GreenIlluminator = DLPC34XX_IlluminatorEnable_e::DLPC34XX_IE_ENABLE;
pat_config.BlueIlluminator = DLPC34XX_IlluminatorEnable_e::DLPC34XX_IE_DISABLE;
pat_config.IlluminationTime = 171;
pat_config.PreIlluminationDarkTime = 793;
pat_config.PostIlluminationDarkTime = 31;
pat_config.SequenceType = DLPC34XX_SequenceType_e::DLPC34XX_ST_ONE_BIT_MONO;
pat_config.NumberOfPatterns = 16;
DLPC34XX_WritePatternConfiguration(&pat_config);
///Read Splash Header
uint32_t splash_image_index = 0;
DLPC34XX_SplashScreenHeader_s splash_screen_header;
DLPC34XX_ReadSplashScreenHeader(splash_image_index, &splash_screen_header);
/// Write Input Image Size
uint16_t pixels_per_line = splash_screen_header.WidthInPixels;
uint16_t lines_per_frame = splash_screen_header.HeightInPixels;
if (DLPC34XX_WriteInputImageSize(pixels_per_line, lines_per_frame) != 0)
return -1;
/// Write Image Crop
uint16_t capture_start_pixel = 0;
uint16_t capture_start_line = 0;
if (DLPC34XX_WriteImageCrop(capture_start_pixel, capture_start_line, pixels_per_line, lines_per_frame) != 0)
return -1;
/// Write Display Size
uint16_t start_pixel = 0;
uint16_t start_line = 0;
if (DLPC34XX_WriteDisplaySize(start_pixel, start_line, pixels_per_line, lines_per_frame) != 0)
return -1;
/// Write Splash Screen Select
if (DLPC34XX_WriteSplashScreenSelect(splash_image_index) != 0)
return -1;
/// Write Operating Mode Select
if (DLPC34XX_WriteOperatingModeSelect(DLPC34XX_OM_SENS_SPLASH_PATTERN) != 0)
return -1;
/// Write Spalsh Screen Execute
if (DLPC34XX_WriteSplashScreenExecute() != 0)
return -1;
/// Write Image Freeze
if (DLPC34XX_WriteImageFreeze(false) != 0)
return -1;
/// Read Operating Mode Select
DLPC34XX_OperatingMode_e operating_mode;
if (DLPC34XX_ReadOperatingModeSelect(&operating_mode) != 0)
return -1;
CYPRESS_I2C_RelinquishI2CBusAccess();
return 0;
}
Thank you in advance for the support.
Best regards,
Jonathan