Other Parts Discussed in Thread: AM68A
Hello,
As I know, TI H3A system supports an AF feature. But I couldn't find proper information to set the AF.
Would you provide an information to use AF feature?
Why I am asking, our system has a MFZ(Motorized Focus and Zoom) lens to support an auto focus function. And it should be worked in real time.
Belows are what I tried to set AF. But It seems that the ROI for AF was not set. Please check whether I tried to setup properly.
What I tried :
1. configured the ROI for AF/AEWB in "imx415_h3a_aewb_dcc.xml"
<h3a_aewb_dcc type="iss_h3a_grid_size"> { 1, // enable: u8 2, // mode: u8 920, // v_start: u16 1600, // h_start: u16 32, // v_size: u8 64, // h_size: u8 10, // v_count: u8 10, // h_count: u8 2, // v_skip: u8 2, // h_skip: u8 1000, // saturation_limit: u16 2, // blk_win_numlines: u16 2158, // blk_row_vpos: u16 2, // Sum Shift: u8 0, // ALaw_En: u8 0, // MedFilt_En: u8 }
2. changed the "h3a_aewb_af_mode" to "TIVX_VPAC_VISS_H3A_MODE_AF" in "/edgeai-tiovx-modules/src/tiovx_viss_module.c"
static vx_status tiovx_viss_module_configure_params(vx_context context, TIOVXVISSModuleObj *obj) { vx_status status = VX_SUCCESS; SensorObj *sensorObj = obj->sensorObj; obj->params.sensor_dcc_id = sensorObj->sensorParams.dccId; .......................... //obj->params.h3a_aewb_af_mode = TIVX_VPAC_VISS_H3A_MODE_AEWB; obj->params.h3a_aewb_af_mode = TIVX_VPAC_VISS_H3A_MODE_AF; ..........................
3. added print out to check the ROI in "/edgeai-gst-plugins/ext/tiovx/gsttiovxisp.c"
static gboolean gst_tiovx_isp_postprocess (GstTIOVXMiso * miso) { GstTIOVXISP *self = NULL; GList *sink_pads_list = NULL; GList *l = NULL; gboolean ret = FALSE; struct v4l2_control control; gchar *video_dev = NULL; vx_map_id h3a_buf_map_id; vx_map_id aewb_buf_map_id; gint i = 0; .......................... ti_2a_wrapper_ret = TI_2A_wrapper_process (&sink_pad->ti_2a_wrapper, &sink_pad->aewb_config, h3a_data, &sink_pad->sensor_in_data, ae_awb_result, &sink_pad->sensor_out_data); if (ti_2a_wrapper_ret) { GST_ERROR_OBJECT (self, "Unable to process TI 2A wrapper: %d", ti_2a_wrapper_ret); goto out; } GST_LOG_OBJECT (sink_pad, "Exposure time output from TI 2A library: %d", sink_pad->sensor_out_data.aePrms.exposureTime[0]); GST_LOG_OBJECT (sink_pad, "Analog gain output from TI 2A library: %d", sink_pad->sensor_out_data.aePrms.analogGain[0]); printf("H3A aewwin1_WINH:%d aewwin1_WINW:%d aewwin1_WINVC:%d, aewwin1_WINHC:%d\n", h3a_data->aew_config.aewwin1_WINH , h3a_data->aew_config.aewwin1_WINW , h3a_data->aew_config.aewwin1_WINVC , h3a_d printf("H3A aew_af_mode:%d channel_id:%d cpu_id:%d, size:%d\n", h3a_data->aew_af_mode, h3a_data->channel_id, h3a_data->cpu_id, h3a_data->size); ..........................
Print Out :
H3A aewwin1_WINH:0 aewwin1_WINW:0 aewwin1_WINVC:0, aewwin1_WINHC:0 => ROI was not set
H3A aew_af_mode:1 channel_id:0 cpu_id:3, size:2112
Thanks,
Jang.