Skip to content

Commit

Permalink
add exposure_val_percent to FrameMetadata
Browse files Browse the repository at this point in the history
  • Loading branch information
deanlee committed Sep 19, 2024
1 parent fc8762a commit d97dae9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions system/camerad/cameras/camera_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ typedef struct FrameMetadata {
float gain;
float measured_grey_fraction;
float target_grey_fraction;
float exposure_val_percent;

float processing_time;
} FrameMetadata;
Expand Down
5 changes: 2 additions & 3 deletions system/camerad/cameras/camera_qcom2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ void CameraState::handle_camera_event(void *evdat) {
meta_data.integ_lines = exposure_time;
meta_data.measured_grey_fraction = measured_grey_fraction;
meta_data.target_grey_fraction = target_grey_fraction;
meta_data.exposure_val_percent = util::map_val(cur_ev[meta_data.frame_id % 3], ci->min_ev, ci->max_ev, 0.0f, 100.0f);
exp_lock.unlock();

// dispatch
Expand Down Expand Up @@ -292,9 +293,7 @@ void CameraState::run() {
framed.setMeasuredGreyFraction(buf.cur_frame_data.measured_grey_fraction);
framed.setTargetGreyFraction(buf.cur_frame_data.target_grey_fraction);
framed.setProcessingTime(buf.cur_frame_data.processing_time);

const float ev = cur_ev[buf.cur_frame_data.frame_id % 3];
const float perc = util::map_val(ev, sensor->min_ev, sensor->max_ev, 0.0f, 100.0f);
framed.setExposureValPercent(buf.cur_frame_data.exposure_val_percent);
framed.setExposureValPercent(perc);
framed.setSensor(sensor->image_sensor);

Expand Down

0 comments on commit d97dae9

Please sign in to comment.