#include "autoexposure.h"
Include dependency graph for autoexposure.c:
Go to the source code of this file.
Functions | |
int | main (int argc, char *argv[]) |
int main | ( | int | argc, | |
char * | argv[] | |||
) |
*************************************************************************** ! FILE NAME : autoexposure.c ! DESCRIPTION: Daemon to adjust camera exposure and white balance ! Copyright (C) 2008 Elphel, Inc. ! -----------------------------------------------------------------------------** ! This program is free software: you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation, either version 3 of the License, or ! (at your option) any later version. ! ! This program is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program. If not, see <http://www.gnu.org/licenses/>. ! -----------------------------------------------------------------------------** ! !
TODO: - make it an argument
0 - off, 1 each other frame, 2 - 2 on, 2 - off
initialization errors
tempoorary hack for testing
Next function call will wait until the daemon_bit will be enabled in [P_DAEMON_EN] giving a chance to other applications to initialize
restart loop
initialization errors
Main loop
======= 0 here
wait for autoexposure daemon to be enabled (let it sleep if not)
TODO: Make it possible for this_frame to lag slightly (1 frame) to compensate for CPU being busy with other tasks? Need to re-initialize after long sleep
initialization errors
Is exposure black level calibration requested (will produce 2 (or 1, depending on trigger mode?) dark frames
In HDR mode make sure we skip those different frames;
======= 0 here
restart on errors
======= 0 here
WB processing
restart on errors
TODO:Add HDR here
restart on errors
======= 0 here
need to wait for the next_frame here, requesting histogram(s) for it. if it is far in the future - wait so we can schedule histograms ahead of time - both?
Will process WB after exposure, don't chnage next_frame to next_frame_wb histograms are only availble for the previous frame, so this_frame-1
Definition at line 75 of file autoexposure.c.
References aexpCorr(), autoexposure_debug, COLOR_Y_NUMBER, DAEMON_BIT_AUTOEXPOSURE, ELP_FERR, exit, exposureHDR(), fd_fparmsall, fd_histogram_cache, framePars, G_AE_INTEGERR, G_DEBUG, G_HIST_DIM_01, G_HIST_DIM_23, G_NEXT_AE_FRAME, G_THIS_FRAME, get_imageParamsThatValid(), get_imageParamsThis, GLOBALPARS, initFilesMmap(), initParams(), LSEEK_DAEMON_HIST_Y, LSEEK_FRAME_WAIT_ABS, MDF0, MDF1, MDF3, P_EXP_AHEAD, P_HDR_DUR, P_VEXPOS, PARS_FRAMES_MASK, recalibrateDim(), SEEK_END, skipHDR(), stderr, this_frame, usage, waitRequstPrevHist(), and whiteBalanceCorr().