Add DCP calibration files for sensors
Read .dcp files stored in the same directory as the camera configuration files and copy over the calibration curves into the DNG files after taking a picture.
This commit is contained in:
@@ -375,6 +375,18 @@ update_process_pipeline()
|
||||
mp_camera_control_get_int32(info->camera, V4L2_CID_EXPOSURE);
|
||||
}
|
||||
|
||||
MPControl control;
|
||||
float balance_red = 1.0f;
|
||||
float balance_blue = 1.0f;
|
||||
if (mp_camera_query_control(info->camera, V4L2_CID_RED_BALANCE, &control)) {
|
||||
int red = mp_camera_control_get_int32(info->camera,
|
||||
V4L2_CID_RED_BALANCE);
|
||||
int blue = mp_camera_control_get_int32(info->camera,
|
||||
V4L2_CID_BLUE_BALANCE);
|
||||
balance_red = (float)red / (float)control.max;
|
||||
balance_blue = (float)blue / (float)control.max;
|
||||
}
|
||||
|
||||
struct mp_process_pipeline_state pipeline_state = {
|
||||
.camera = camera,
|
||||
.mode = mode,
|
||||
@@ -385,6 +397,8 @@ update_process_pipeline()
|
||||
.gain_is_manual = current_controls.gain_is_manual,
|
||||
.gain = current_controls.gain,
|
||||
.gain_max = info->gain_max,
|
||||
.balance_red = balance_red,
|
||||
.balance_blue = balance_blue,
|
||||
.exposure_is_manual = current_controls.exposure_is_manual,
|
||||
.exposure = current_controls.exposure,
|
||||
.has_auto_focus_continuous = info->has_auto_focus_continuous,
|
||||
|
Reference in New Issue
Block a user