Exemplo n.º 1
0
static int get_library_params(void)
{
	// Get AE settings
	if (mw_get_ae_param(&g_mw_basic_iq.ae) < 0) {
		APP_ERROR("mw_get_ae_param error\n");
		return -1;
	}
	memcpy(&iq_map.ae, &g_mw_basic_iq.ae, sizeof(mw_ae_param));
	// Get Image settings
	if (mw_get_image_param(&g_mw_image) < 0) {
		APP_ERROR("mw_get_image_param error\n");
		return -1;
	}
	memcpy(&image_map, &g_mw_image, sizeof(mw_image_param));
	// Get AWB settings
	if (mw_get_awb_param(&g_mw_awb) < 0) {
		APP_ERROR("mw_get_awb_param error\n");
		return -1;
	}
	memcpy(&awb_map, &g_mw_awb, sizeof(mw_awb_param));
	// Get AF settings
	if (mw_get_af_param(&g_mw_af) < 0) {
		APP_ERROR("mw_get_af_param error\n");
		return -1;
	}
	memcpy(&af_map, &g_mw_af, sizeof(mw_af_param));
	// Get other settings
	#if 0
	if (mw_get_iq_preference(&g_mw_basic_iq.ae_preference) < 0) {
		APP_ERROR("mw_get_iq_preference error\n");
		return -1;
	}
	iq_map.ae_preference = g_mw_basic_iq.ae_preference;
	if (mw_get_ae_metering_mode(&g_mw_basic_iq.metering_mode) < 0) {
		APP_ERROR("mw_get_ae_metering_mode error\n");
		return -1;
	}
	iq_map.metering_mode = g_mw_basic_iq.metering_mode;
	if (mw_get_auto_local_exposure_mode(&g_mw_basic_iq.local_exposure_mode) < 0) {
		APP_ERROR("mw_get_auto_local_exposure_mode error\n");
		return -1;
	}
	iq_map.local_exposure_mode = g_mw_basic_iq.local_exposure_mode;
	if (mw_get_mctf_strength(&g_mw_basic_iq.mctf_strength) < 0) {
		APP_ERROR("mw_get_mctf_strength error\n");
		return -1;
	}
	iq_map.mctf_strength = g_mw_basic_iq.mctf_strength;
	#endif
	if(get_lib_image_params() < 0) {
		APP_ERROR("get_lib_image_params error\n");
		return -1;
	}
	return 0;
}
Exemplo n.º 2
0
/*new AE sensor gain(db): range 0 ~ 60*/
int imagingGetAEGainMax(int *gainMax)
{
	int retVal = 0;
#ifndef NO_HARDWARE
	mw_ae_param aeParams;

	retVal = mw_get_ae_param(&aeParams);
	printf("Current sensor gain max is %d .\n", aeParams.sensor_gain_max);
	*gainMax = aeParams.sensor_gain_max;
#endif
	
	return retVal;
}