Go to the source code of this file.
Functions | |
printDefaultPage () | |
Print the default page that has some demo links. | |
showImgData ($meta, $skipped, $prev, $imgScale, $done) | |
showLastImages ($numImg, $imagesPerRow, $imgScale) | |
TODO:if $todo is provided in $_GET - try to find the correct images even if they are not the latest. | |
encodeTodo ($todo, $frame_zero) | |
Encode $todo to a string that can be passed in GET HTTP request. | |
decodeTodo ($encoded_todo) | |
Reverse endodeTodo() - create $todo array from the encoded string. | |
showSequence ($todo, $frame_zero) | |
applyPost ($todo) | |
parsePost () | |
addGammas ($todo) | |
Scan commands for possible changing gamma tables, calculate them in advance (driver can only scale gamma, not calculate prototypes). | |
myval ($s) | |
parseGetNames () | |
readCurrentParameterValues () | |
mainJavascript ($refreshSig) | |
============ | |
startPage ($page_title, $javascript) | |
endPage () | |
showControlButtonsRow ($table_width, $readonly, $testMode, $showSeqMode, $encoded_todo, $imagesNumber, $imagesPerRow, $imgScale, $checkNotUncheck) | |
Called twice from printPage($encoded_todo). | |
printPage ($encoded_todo) | |
getDescription ($compositeName, $descriptions) | |
getParDescriptions ($autocampars) | |
Variables | |
$autocampars = '/usr/html/autocampars.php' | |
globals | |
$descriptions = getParDescriptions($autocampars) | |
$default_ahead = 3 | |
$maxahead = 6 | |
$minahead = 4 | |
maximal ahead of the current frame that tasks can currently be set to driver; | |
$brief = true | |
skip to frame $minahead from the soonest next task before programming | |
$ahead_separator = '*' | |
$refreshSig = "refresh" | |
$testMode = -1 | |
$showSeqMode = -1 | |
don't even show | |
$testBefore = 2 | |
don't even show | |
$testAfter = 2 | |
Start compressor $testBefore frames before first task. | |
$framesBeforeStart = 2 | |
Stop compressor $testAfter frames after the last task. | |
$imgsrv = "http://".$_SERVER['SERVER_ADDR'].":8081" | |
In test mode - compressor will be started theis frames after "now". | |
$defaultImgScale = 0.2 | |
$defaultImagesPerRow = 3 | |
20% image size | |
$defaultImagesNumber = 9 | |
$isPost = $_SERVER["REQUEST_METHOD"]=="POST" | |
$ignoreVals = $isPost | |
$imagesNumber = $defaultImagesNumber | |
$imagesPerRow = $defaultImagesPerRow | |
$imgScale = $defaultImgScale | |
$embedImageScale = 0 | |
$defaultEmbedImageScale = 0.3 | |
$encoded_todo = "" | |
$page_title = "Default control/test page for the NC353L camera" | |
$elp_const = get_defined_constants(true) | |
$elp_const = $elp_const["elphel"] |
addGammas | ( | $ | todo | ) |
Scan commands for possible changing gamma tables, calculate them in advance (driver can only scale gamma, not calculate prototypes).
todo | - array of arrays of parameter chnages |
duplicates will be eliminated
Definition at line 693 of file parsedit.php.
References $black, $gamma, $pars, and $showSeqMode.
applyPost | ( | $ | todo | ) |
Definition at line 596 of file parsedit.php.
References $i, $maxahead, $minahead, $pars, $showSeqMode, and $timeout.
decodeTodo | ( | $ | encoded_todo | ) |
Reverse endodeTodo() - create $todo array from the encoded string.
$encoded_todo | - string representation of todo array |
Definition at line 546 of file parsedit.php.
References $encoded_todo, $frame, and int.
Referenced by showLastImages().
encodeTodo | ( | $ | todo, | |
$ | frame_zero | |||
) |
Encode $todo to a string that can be passed in GET HTTP request.
$todo | - array of arrays of parameter chnages | |
$frame_zero | - sequence start frame number that should be added to keys in $todo to get absolute frame numbers |
Definition at line 530 of file parsedit.php.
References $frame.
endPage | ( | ) |
Definition at line 961 of file parsedit.php.
getDescription | ( | $ | compositeName, | |
$ | descriptions | |||
) |
Definition at line 1127 of file parsedit.php.
References $descriptions, $prefix, $width, and exit.
Referenced by printPage().
getParDescriptions | ( | $ | autocampars | ) |
mainJavascript | ( | $ | refreshSig | ) |
============
remove &$refreshSig from the url (if any)
Preserve test_mode through GET
Preserve show sequence through GET
Definition at line 837 of file parsedit.php.
References $refreshSig, d, mode, and window.
myval | ( | $ | s | ) |
parseGetNames | ( | ) |
Definition at line 718 of file parsedit.php.
References $_GET, $address, $ahead, $ahead_separator, $brief, $default_ahead, $defaultEmbedImageScale, $defaultImagesNumber, $defaultImagesPerRow, $defaultImgScale, $elp_const, $embedImageScale, $ignoreVals, $imagesNumber, $imagesPerRow, $imgScale, $isPost, $maxahead, $page_title, $refreshSig, $rslt, $showSeqMode, $testMode, $xml, ahead, ERROR, exit, header, myval(), showLastImages(), and test.
parsePost | ( | ) |
Definition at line 650 of file parsedit.php.
References $delay, $framesBeforeStart, $showSeqMode, $testAfter, $testBefore, $testMode, int, and name.
printDefaultPage | ( | ) |
Print the default page that has some demo links.
at least ELPHEL_CONST_TASKLET_CTL_NOSAME bit should be 0 so initialization will not wait for the frame sync
When servicing interrupts, try programming up to 2 frames ahead of the due to program time)
Extra clock cycles needed to compress a frame (in addition to per macroblocs time)
When using async sensor mode use sync time instead of frame sync (start of readout) for the timestamp (eliminates autoexposure caused jitter)
8 bit data mode
80 percent JPEG image quality
regular color mode (not mono or JP4 flavors)
2.0 (200% blue/green color saturation (to compensate for effect of non-unity gamma)
2.0 (200% blue/green color saturation
No bayer shift
turn on sensor in continuous mode
run compressor in continuous mode
red component: black level=10, gamma=0.57, scale=1.0 (will force calculation gamma table)
same for green (main one, red row)
same for green (second, blue row)
same for blue
setting sensor to zero will initiate sensor detection attempt (should be frame 0)
run compressor in continuous mode
Daemons are controlled by bits in this register. Autoexposure bit is 0 (1<<0 == 1)
setting it to 0 will only disable autoexposure, but not HDR modes or white balancing
Fraction of all pixels that should be below P_AEXP_LEVEL (16.16 - 0x10000 - all pixels)
Target output level: [AEXP_FRACPIX]/0x10000 of all pixels should have value below it (0x10000 - full output scale)
Autoexposure period (will be increased if below the latency)
AE error (logariphmic exposures) is integrated between frame and corrections are scaled when error is below thershold (500)
Current frame
Next frame to be processed by autoexposure
Next frame to be processed by the white balance
exposure measured in sensor scanlines (autoexposure modifies number of exposure lines)
exposure in microseconds
Next frame to be processed by the white balance
Percentiles measured for colors 0 (lower 16 bits) and 1 (high 16 bits) for VEXPOS=1 (darkest)
Setting it to 0xffffffff will initiate dark levels re-calibration (making 2 dark drames)
Same for colors 2 and 3
bitmask - which colors to correct (1 - correct, 0 - ignore). Currently only works as ON/OFF
White balance period (will be increased if below the latency)
White balance level of white (16.16 - 0x10000 is full scale, 0xfae1 - 98%, default)
White balance fraction (16.16) of all pixels that have level above [P_WB_WHITELEV] for the brightest color locally [WB_WHITELEV] will be decreased if needed to satisfy [WB_WHITELEV]. default is 1% (0x028f)
additional correction for R from calulated by white balance (16.16)
additional correction for GB (second green) from calulated by white balance (16.16)
additional correction for B from calulated by white balance (16.16)
How many frames the white balance correction has to be the same sign before it will be applied (<128,for each color independently)
red component: black level=10, gamma=0.57, scale=1.0 (will force calculation gamma table)
same for green (main one, red row)
same for green (second, blue row)
same for blue
0 - HDR 0ff, >1 - duration of same exposure (currently 1 or 2 - for free running)
if less than 0x10000 - number of lines of exposure, >=10000 - relative to "normal" exposure
How many frames ahead of the current frame write exposure to the sensor
current integrated error in the AE loop
Relative histogram window width (0x10000 - 100%)
Relative histogram window height (0x10000 - 100%)
Relative histogram window left (0x10000 - 100%)
Relative histogram window top (0x10000 - 100%)
Absolute (as written to FPGA) histogram window width
Absolute (as written to FPGA) histogram window height
Absolute (as written to FPGA) histogram window left (counted from the left of WOI margin)
Absolute (as written to FPGA) histogram window top (counted from the top of WOI)
run compressor in continuous mode
Daemons are controlled by bits in this register. Autoexposure bit is 0 (1<<0 == 1)
setting it to 0 will only disable autoexposure, but not HDR modes or white balancing
Fraction of all pixels that should be below P_AEXP_LEVEL (16.16 - 0x10000 - all pixels)
Target output level: [AEXP_FRACPIX]/0x10000 of all pixels should have value below it (0x10000 - full output scale)
Autoexposure period (will be increased if below the latency)
AE error (logariphmic exposures) is integrated between frame and corrections are scaled when error is below thershold (500)
Current frame
Next frame to be processed by autoexposure
exposure measured in sensor scanlines (autoexposure modifies number of exposure lines)
exposure in microseconds
Percentiles measured for colors 0 (lower 16 bits) and 1 (high 16 bits) for VEXPOS=1 (darkest)
Setting it to 0xffffffff will initiate dark levels re-calibration (making 2 dark drames)
Same for colors 2 and 3
How many frames ahead of the current frame write exposure to the sensor
Relative histogram window width (0x10000 - 100%)
Relative histogram window height (0x10000 - 100%)
Relative histogram window left (0x10000 - 100%)
Relative histogram window top (0x10000 - 100%)
Absolute (as written to FPGA) histogram window width
Absolute (as written to FPGA) histogram window height
Absolute (as written to FPGA) histogram window left (counted from the left of WOI margin)
Absolute (as written to FPGA) histogram window top (counted from the top of WOI)
Current integrated error in the AE loop
run compressor in continuous mode
Daemons are controlled by bits in this register. Autoexposure bit is 0 (1<<0 == 1)
Current frame
Next frame to be processed by the white balance
Next frame to be processed by the white balance
bitmask - which colors to correct (1 - correct, 0 - ignore). Currently only works as ON/OFF
White balance period (will be increased if below the latency)
White balance level of white (16.16 - 0x10000 is full scale, 0xfae1 - 98%, default)
White balance fraction (16.16) of all pixels that have level above [P_WB_WHITELEV] for the brightest color locally [WB_WHITELEV] will be decreased if needed to satisfy [WB_WHITELEV]. default is 1% (0x028f)
additional correction for R from calulated by white balance (16.16)
additional correction for GB (second green) from calulated by white balance (16.16)
additional correction for B from calulated by white balance (16.16)
WB errors are integrated between frame and corrections are scaled when error is below thershold (500)
minimal sensor analog gain (0x100 - 1.0)
maximal sensor analog gain (0x100 - 1.0)
minimal correction to be applied to the analog gain (should be set larger that sensor actual gain step to prevent oscillations (0x100 - 1.0, 0x40 - 1/8)
Enable analog gain controls in white balancing
red component: black level=10, gamma=0.57, scale=1.0 (will force calculation gamma table)
same for green (main one, red row)
same for green (second, blue row)
same for blue
Analog gains
R channel gain (mono gain) 8.8 0x100 - 1.0
G channel gain (mono gain) 8.8 0x100 - 1.0
GB channel gain (mono gain) 8.8 0x100 - 1.0
B channel gain (mono gain) 8.8 0x100 - 1.0
Sensor register gain R
Sensor register gain G
Sensor register gain GB
Sensor register gain B
current integrated error in the WB loop
run compressor in continuous mode
Daemons are controlled by bits in this register. Autoexposure bit is 0 (1<<0 == 1)
setting it to 0 will only disable autoexposure, but not HDR modes or white balancing
exposure measured in sensor scanlines (autoexposure modifies number of exposure lines)
exposure in microseconds
0 - HDR 0ff, >1 - duration of same exposure (currently 1 or 2 - for free running)
if less than 0x10000 - number of lines of exposure, >=10000 - relative to "normal" exposure
Current frame
External trigger mode bit 0 - "old" external mode (0- internal, 1 - external ) bit 1 - enable(1) or disable(0) external trigger to stop clip bit 2 - async (snapshot, ext trigger) mode, 0 - continuous NOTE: Only this bit is used now ! bit 3 - no overlap, single frames: program - acquire/compress same frame
0.2 sec output sync period (32 bits, in pixel clocks) >=256 repetitive with specified period. NOTE: Currently there is no verification that period is longer than sensor/compressor can handle
trigger delay, 32 bits in pixel clocks (needed when multiple cameras are synchronized)
When using async sensor mode use sync time instead of frame sync (start of readout) for the timestamp (eliminates autoexposure caused jitter)
Current frame
Next parameters are non-zero only for external connections and should match particular I/O boards/connectors
trigger condition, 0 - internal, else dibits ((use<<1) | level) for each GPIO[11:0] pin
trigger output to GPIO, dibits ((use << 1) | level_when_active). Bit 24 - test mode, when GPIO[11:10] are controlled by other internal signals
Sensor register MODE1 (trigger bit)
Definition at line 157 of file parsedit.php.
printPage | ( | $ | encoded_todo | ) |
Definition at line 1001 of file parsedit.php.
References $brief, $descriptions, $embedImageScale, $encoded_todo, $imagesNumber, $imagesPerRow, $imgScale, $imgsrv, $meta, $page_title, $showSeqMode, $testMode, $width, ahead, getDescription(), height, name, SEEK_END, showControlButtonsRow(), value, and width.
readCurrentParameterValues | ( | ) |
Definition at line 809 of file parsedit.php.
References $ignoreVals, $page_title, $pars, name, and value.
showControlButtonsRow | ( | $ | table_width, | |
$ | readonly, | |||
$ | testMode, | |||
$ | showSeqMode, | |||
$ | encoded_todo, | |||
$ | imagesNumber, | |||
$ | imagesPerRow, | |||
$ | imgScale, | |||
$ | checkNotUncheck | |||
) |
Called twice from printPage($encoded_todo).
Definition at line 966 of file parsedit.php.
References $encoded_todo, $imagesNumber, $imagesPerRow, $imgScale, $showSeqMode, and $testMode.
Referenced by printPage().
showImgData | ( | $ | meta, | |
$ | skipped, | |||
$ | prev, | |||
$ | imgScale, | |||
$ | done | |||
) |
showLastImages | ( | $ | numImg, | |
$ | imagesPerRow, | |||
$ | imgScale | |||
) |
TODO:if $todo is provided in $_GET - try to find the correct images even if they are not the latest.
failed to find the right frame in circbuf - probably overwritten
TODO: If all changes were later than the images shown - disregard $todo
$done per image
Definition at line 433 of file parsedit.php.
References $_GET, $circbuf_pointers, $frame, $i, $imagesPerRow, $imgScale, $meta, $page_title, decodeTodo(), endPage(), frame, min, showImgData(), and startPage().
Referenced by parseGetNames().
showSequence | ( | $ | todo, | |
$ | frame_zero | |||
) |
startPage | ( | $ | page_title, | |
$ | javascript | |||
) |
$ahead_separator = '*' |
$autocampars = '/usr/html/autocampars.php' |
globals
! PHP script ! FILE NAME : parsedit.php ! DESCRIPTION: ! AUTHOR : Elphel, Inc. ! 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/>. ! -----------------------------------------------------------------------------** !
Definition at line 92 of file parsedit.php.
Referenced by getParDescriptions().
$brief = true |
skip to frame $minahead from the soonest next task before programming
Definition at line 97 of file parsedit.php.
Referenced by parseGetNames(), and printPage().
$default_ahead = 3 |
$defaultEmbedImageScale = 0.3 |
$defaultImagesNumber = 9 |
$defaultImagesPerRow = 3 |
$defaultImgScale = 0.2 |
$descriptions = getParDescriptions($autocampars) |
$elp_const = $elp_const["elphel"] |
Definition at line 129 of file parsedit.php.
$elp_const = get_defined_constants(true) |
Definition at line 128 of file parsedit.php.
$embedImageScale = 0 |
Definition at line 114 of file parsedit.php.
$encoded_todo = "" |
Definition at line 116 of file parsedit.php.
Referenced by decodeTodo(), printPage(), and showControlButtonsRow().
$framesBeforeStart = 2 |
Stop compressor $testAfter frames after the last task.
Definition at line 104 of file parsedit.php.
Referenced by parsePost().
$ignoreVals = $isPost |
Definition at line 110 of file parsedit.php.
Referenced by parseGetNames(), and readCurrentParameterValues().
$imagesNumber = $defaultImagesNumber |
Definition at line 111 of file parsedit.php.
Referenced by parseGetNames(), printPage(), and showControlButtonsRow().
$imagesPerRow = $defaultImagesPerRow |
Definition at line 112 of file parsedit.php.
Referenced by parseGetNames(), printPage(), showControlButtonsRow(), and showLastImages().
$imgScale = $defaultImgScale |
Definition at line 113 of file parsedit.php.
Referenced by parseGetNames(), printPage(), showControlButtonsRow(), showImgData(), and showLastImages().
$imgsrv = "http://".$_SERVER['SERVER_ADDR'].":8081" |
In test mode - compressor will be started theis frames after "now".
Definition at line 105 of file parsedit.php.
$isPost = $_SERVER["REQUEST_METHOD"]=="POST" |
$maxahead = 6 |
$minahead = 4 |
maximal ahead of the current frame that tasks can currently be set to driver;
Definition at line 96 of file parsedit.php.
Referenced by applyPost().
$page_title = "Default control/test page for the NC353L camera" |
Definition at line 121 of file parsedit.php.
Referenced by parseGetNames(), printPage(), processGet(), readCurrentParameterValues(), showLastImages(), and startPage().
$refreshSig = "refresh" |
$showSeqMode = -1 |
don't even show
Definition at line 101 of file parsedit.php.
Referenced by addGammas(), applyPost(), parseGetNames(), parsePost(), printPage(), and showControlButtonsRow().
$testAfter = 2 |
Start compressor $testBefore frames before first task.
Definition at line 103 of file parsedit.php.
Referenced by parsePost().
$testBefore = 2 |
$testMode = -1 |
Definition at line 100 of file parsedit.php.
Referenced by parseGetNames(), parsePost(), printPage(), and showControlButtonsRow().