Tool/software:
Hello,
We are in the process of tuning the ISP (SDK 09_01_00_22) for my own sensor.
Using the app_single_cam software, we can capture RAW images and YUV images, but there is an issue with white balance. Therefore, the following steps were taken:
-
I followed the AWB Plugin Guide in DCC to perform white balance calibration for the camera and generated the mycamera_awb_alg_ti3_tuning.xml file. And put it in ti-processor-sdk-rtos-j721s2-evm-09_01_00_06/imaging/sensor_drv/src/mycamera/dcc_xmls
-
Used generate_dcc.sh to generate the dcc_2a_mycamera.h file.
-
Added my camera’s configuration in the app_iss_common.c file (in the functions
appIssGetDCCSize2A
andappIssGetDCCBuff2A
), run make imaging_scrub & make vision_apps_scrub then make imaging&make vision_apps
but the white balance is still not correct.
I printed out DCCSize2A, found that the size is the same as dcc_2a_imx390, not my expected value (25587)."sensor name : mycamera,size : 22321,sensor_wdr_mode:0. "
dcc_buff_size_driver = appIssGetDCCSize2A(obj->sensor_name, sensor_wdr_mode);
printf("sensor name : %s,size : %d,sensor_wdr_mode:%u\n",obj->sensor_name,dcc_buff_size_driver,sensor_wdr_mode);
Even after I forcibly modified both the size and buffer to match my own settings, the white balance is still incorrect.
//dcc_buff_size_driver = appIssGetDCCSize2A(obj->sensor_name, sensor_wdr_mode);
dcc_buff_size_driver = DCC_2A_mycamera_DCC_CFG_NUM_ELEM;
//status = appIssGetDCCBuff2A(obj->sensor_name, sensor_wdr_mode, dcc_2a_buf, dcc_buff_size_driver);
memcpy(dcc_2a_buf, dcc_2a_mycamera_linear, dcc_buff_size_driver);
I saved RAW and YUV images under the following three conditions:
1.dcc_buff_size_driver = -1
2.dcc_buff_size_driver = appIssGetDCCSize2A(obj->sensor_name, sensor_wdr_mode);
status = appIssGetDCCBuff2A(obj->sensor_name, sensor_wdr_mode, dcc_2a_buf, dcc_buff_size_driver);
3.dcc_buff_size_driver = DCC_2A_mycamera_DCC_CFG_NUM_ELEM;
memcpy(dcc_2a_buf, dcc_2a_mycamera_linear, dcc_buff_size_driver);
By the way, in the function appDccUpdatefromFS, is the break statement missing in the case blocks?int32_t appDccUpdatefromFS(char* sensor_name, uint8_t wdr_mode,
vx_node node_viss, uint32_t viss_node_index,
vx_node node_aewb, uint32_t aewb_node_index,
vx_node node_ldc, uint32_t ldc_node_index,
vx_context context)
{
char dcc_dir_path[MAX_FOLDER_NAME_LEN];
char op_mode[8];
int dcc_num_bytes;
int dcc_bytes_read;
uint8_t * dcc_buf;
switch(wdr_mode)
{
case 0:
/*Linear mode*/
snprintf(op_mode, 8, "%s", "linear");
default:
/*WDR mode*/
snprintf(op_mode, 8, "%s", "wdr");
}