apps/autoexposure/autoexposure.c File Reference

#include "autoexposure.h"

Include dependency graph for autoexposure.c:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])


Function Documentation

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/>. ! -----------------------------------------------------------------------------** ! !

Log
autoexposure.c,v
! Revision 1.1.1.1 2008/11/27 20:04:01 elphel ! ! ! Revision 1.16 2008/11/18 19:30:16 elphel ! Added initialization of the "next" frame - otherwise it wait _very_ long if the camera frame number is reset ! ! Revision 1.15 2008/11/15 23:08:24 elphel ! 8.0.alpha17 - split autoexposure source file ! ! Revision 1.14 2008/11/15 07:05:38 elphel ! implemented analog gain control (in addition to gammas) while while balancing ! ! Revision 1.13 2008/11/15 03:10:13 elphel ! Some parameters renamed, reassigned. ! ! Revision 1.12 2008/11/14 07:13:32 elphel ! Added gammaReverse() and gammaDirect() functions, TODO lists, bug fixes ! ! Revision 1.11 2008/11/14 01:01:59 elphel ! cleared debug output ! ! Revision 1.10 2008/11/13 05:40:45 elphel ! 8.0.alpha16 - modified histogram storage, profiling ! ! Revision 1.9 2008/11/08 05:52:21 elphel ! debug feature ! ! Revision 1.8 2008/11/04 17:40:34 elphel ! comment typos ! ! Revision 1.7 2008/11/02 00:32:35 elphel ! added TODO ! ! Revision 1.6 2008/10/31 18:26:32 elphel ! Adding support for constants like SENSOR_REGS32 (defined constant plus 32 to simplify referencing sensor registers from PHP ! ! Revision 1.5 2008/10/29 04:18:28 elphel ! v.8.0.alpha10 made a separate structure for global parameters (not related to particular frames in a frame queue) ! ! Revision 1.4 2008/10/28 07:05:12 elphel ! implemented white balance, HDR mode (1/1 and 2/2) ! ! Revision 1.3 2008/10/26 05:55:38 elphel ! snapshot ! ! Revision 1.2 2008/10/25 19:49:15 elphel ! 8.0.alpha8 - added autoexposure to the installation ! ! Revision 1.1 2008/10/24 00:34:12 elphel ! initial release !

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().


Generated on Fri Nov 28 00:06:42 2008 for elphel by  doxygen 1.5.1