packages/web/353/camvc/camvc.php File Reference

Go to the source code of this file.

Functions

 out1x1gif ()
 myval ($s)
 decodeSet ($encoded_set)
 Decode set=... parameters.
 fixRGBScales ()
 Currently there are no rscale/bscale/gscale input parameters, they are to be provided all together If at least one is missing - none will be applied.
 fixGammaBlack ()
 prepSetNative ()
 TODO: Don't forget to load gamma tables used - done.
 applySetNative ($ahead)
 addGammas ()
 Scan commands for possible changing gamma tables, calculate them in advance (driver can only scale gamma, not calculate prototypes).
 abstractToNative ($absPar)
 abstractValue ($absPar)
 decodeGet ($encoded_get)
 Decode set=... parameters.

Variables

 $MAX_EXECUTION_TIME = 20
 main()
 $deadline = time()+$MAX_EXECUTION_TIME
 $exif_get = false
 set_time_limit(20); - /// does not work!
 $circbuf_get = false
 $debug_arr = array()
 $toRead = array()
 $hist_in_thresh = 0.0
 $hist_out_thresh = 0.0
 $get = array()
 $set = array()
 abstract parameters to read (i.e. e, ww, fliph)
 $setNative = array()
 abstract parameters to write (i.e. e, ww, fliph)
 $allNative = array()
 array (indexed by frame Numbers) of array of camera parameters to write (i.e. EXPOS, WOI_WIDTH, FLIPH)
 $ahead = 3
 all native parameters that are needed to be read
case _stime
 $a = ((float) $value)/1000
 break
case imgsrv
case exif
 break
case description
 break
case circbuf
 break
case hist_in_thresh
 break
case hist_out_thresh
 break
case ahead
 break
case set
 break
case get
 break
case timeout
 break
 $allNative = elphel_get_P_arr($allNative)
 Do whatever needed.
 $parVal = array()
 $xml = new SimpleXMLElement("<?xml version='1.0'?><pars/>")
 $xNative = $xParName->addChild ('native')
 $circbuf = elphel_get_circbuf_pointers()
 $rslt = $xml->asXML()


Function Documentation

abstractToNative ( absPar  ) 

Definition at line 223 of file camvc.php.

Referenced by decodeGet(), and decodeSet().

abstractValue ( absPar  ) 

Definition at line 272 of file camvc.php.

References $allNative, and $get.

addGammas (  ) 

Scan commands for possible changing gamma tables, calculate them in advance (driver can only scale gamma, not calculate prototypes).

Parameters:
todo - array of arrays of parameter chnages

$gammas made global - just for debugging

duplicates will be eliminated

duplicates will be eliminated

duplicates will be eliminated

duplicates will be eliminated

duplicates will be eliminated

Definition at line 201 of file camvc.php.

References $black, $gamma, $pars, and $setNative.

applySetNative ( ahead  ) 

Definition at line 186 of file camvc.php.

References $ahead, $pgmFrameNumber, $set, and $setNative.

decodeGet ( encoded_get  ) 

Decode set=... parameters.

Parameters:
$encoded_get - string representation of /parameter/.. array

always read frame number to reference read parameters to

Definition at line 303 of file camvc.php.

References $allNative, $get, and abstractToNative().

decodeSet ( encoded_set  ) 

Decode set=... parameters.

Parameters:
$encoded_set - string representation of [frame]/parameter:value array

add to the parameters to be read

Definition at line 63 of file camvc.php.

References $allNative, $frame, $set, abstractToNative(), and value.

fixGammaBlack (  ) 

Definition at line 103 of file camvc.php.

References $set, gam, and pxl.

fixRGBScales (  ) 

Currently there are no rscale/bscale/gscale input parameters, they are to be provided all together If at least one is missing - none will be applied.

make them have the same delay - just in case

make them have the same delay - just in case

remove

Definition at line 87 of file camvc.php.

References $allNative, $set, bscale, and rscale.

myval ( s  ) 

Definition at line 52 of file camvc.php.

References $s.

out1x1gif ( void   ) 

******************************************************************************* ! FILE NAME : camvc.php ! DESCRIPTION: PHP companion of camvc ! 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
camvc.php,v
! Revision 1.1.1.1 2008/11/27 20:04:03 elphel ! ! ! Revision 1.6 2008/11/17 23:42:46 elphel ! changed myval()o accept numbers in "" ! ! Revision 1.5 2008/11/16 17:35:53 elphel ! restored histogram (autoexposure) window control ! ! Revision 1.4 2008/11/13 05:40:45 elphel ! 8.0.alpha16 - modified histogram storage, profiling ! ! Revision 1.3 2008/11/10 19:55:51 elphel ! 8.0.alpha15 - first camvc working with 8.0 (just basic features - no autoexposure, white balance, ...), but it is now really possible (again after it was broken for quite a while) to move sliders and navigator windows without fighting with the camera that tried to move them back ! ! Revision 1.2 2008/11/08 23:59:23 elphel ! snapshot ! ! Revision 1.1 2008/11/08 05:54:02 elphel ! snapshot - working on camvc ! !

we have zeros in the string

always good

Definition at line 45 of file camvc.php.

References header.

prepSetNative (  ) 

TODO: Don't forget to load gamma tables used - done.

now all rscale/bscale/gscale should be in the same frame, all together - program them also together (do all fo read, nothing for other 2)

return $allNative["GTAB_R__1600"]/$allNative["GTAB_G__1600"];

Normalise all coefficients, so minimal is 1.0

was 1.0

return array ("GTAB_R__0816"=>100,"GTAB_G__0816"=>100,"GTAB_GB__0816"=>100,"GTAB_B__0816"=>100);

return array ("GTAB_R__0824"=>100,"GTAB_G__0824"=>100,"GTAB_GB__0824"=>100,"GTAB_B__0824"=>100);

******************************

switch ($absPar)

foreach ($set as $absPar=>$value)

second pass - copy native values back to the $set array (to be reported to the client to compare to the values read later

foreach ($set as $absPar=>$value)

Definition at line 119 of file camvc.php.

References $allNative, $delay, $scale, $set, $setNative, bscale, int, min, rscale, and value.


Variable Documentation

$a = ((float) $value)/1000

Definition at line 338 of file camvc.php.

Referenced by find_gps_compass(), i2c_receive(), i2c_send(), parse_seq(), printHistogram(), printRawFrame(), printRawGamma(), printRawHistogram(), process_ifd_entry(), receive_i2c(), receive_i2c_4(), receive_i2c_n(), send_i2c(), send_i2c_4(), send_i2c_4_nc(), send_i2c_4a(), and smbus_send().

$ahead = 3

all native parameters that are needed to be read

Definition at line 328 of file camvc.php.

Referenced by applySetNative(), and parseGetNames().

$allNative = elphel_get_P_arr($allNative)

Do whatever needed.

Definition at line 388 of file camvc.php.

$allNative = array()

array (indexed by frame Numbers) of array of camera parameters to write (i.e. EXPOS, WOI_WIDTH, FLIPH)

Definition at line 327 of file camvc.php.

Referenced by abstractValue(), decodeGet(), decodeSet(), fixRGBScales(), and prepSetNative().

$circbuf = elphel_get_circbuf_pointers()

Definition at line 488 of file camvc.php.

$circbuf_get = false

Definition at line 318 of file camvc.php.

$deadline = time()+$MAX_EXECUTION_TIME

Definition at line 315 of file camvc.php.

$debug_arr = array()

Definition at line 319 of file camvc.php.

$exif_get = false

set_time_limit(20); - /// does not work!

Definition at line 317 of file camvc.php.

$get = array()

Definition at line 323 of file camvc.php.

Referenced by abstractValue(), and decodeGet().

$hist_in_thresh = 0.0

Definition at line 321 of file camvc.php.

$hist_out_thresh = 0.0

Definition at line 322 of file camvc.php.

$MAX_EXECUTION_TIME = 20

main()

Definition at line 314 of file camvc.php.

$parVal = array()

Definition at line 389 of file camvc.php.

$rslt = $xml->asXML()

Definition at line 500 of file camvc.php.

$set = array()

abstract parameters to read (i.e. e, ww, fliph)

Definition at line 324 of file camvc.php.

Referenced by applySetNative(), decodeSet(), fixGammaBlack(), fixRGBScales(), and prepSetNative().

$setNative = array()

abstract parameters to write (i.e. e, ww, fliph)

Definition at line 325 of file camvc.php.

Referenced by addGammas(), applySetNative(), and prepSetNative().

$toRead = array()

Definition at line 320 of file camvc.php.

$xml = new SimpleXMLElement("<?xml version='1.0'?><pars/>")

Definition at line 416 of file camvc.php.

$xNative = $xParName->addChild ('native')

Definition at line 422 of file camvc.php.

case _stime

Definition at line 337 of file camvc.php.

case ahead

Definition at line 361 of file camvc.php.

Referenced by createDefaultConfig(), parseGetNames(), and printPage().

break

Definition at line 371 of file camvc.php.

break

Definition at line 368 of file camvc.php.

break

Definition at line 365 of file camvc.php.

break

Definition at line 362 of file camvc.php.

break

Definition at line 359 of file camvc.php.

break

Definition at line 356 of file camvc.php.

break

Definition at line 353 of file camvc.php.

break

Definition at line 350 of file camvc.php.

break

Definition at line 347 of file camvc.php.

break

Definition at line 341 of file camvc.php.

case circbuf

Definition at line 352 of file camvc.php.

case description

Definition at line 349 of file camvc.php.

Referenced by create_elphel353_kdevelop().

case exif

Definition at line 346 of file camvc.php.

case get

Definition at line 367 of file camvc.php.

case hist_in_thresh

Definition at line 355 of file camvc.php.

case hist_out_thresh

Definition at line 358 of file camvc.php.

case imgsrv

Definition at line 344 of file camvc.php.

Referenced by create_elphel353_kdevelop(), and showUsage().

case set

Definition at line 364 of file camvc.php.

Referenced by create_elphel353_kdevelop(), createDefaultConfig(), cris_ide_init(), and SendToDevice().

int timeout

Definition at line 370 of file camvc.php.

Referenced by arping(), NetBoot(), read_file(), wait_mpu_idle(), and wait_mpu_reg_data().


Generated on Fri Nov 28 00:08:38 2008 for elphel by  doxygen 1.5.1