[Elphel-support] Setting exposure time via PHP

support-list support-list at support.elphel.com
Mon Mar 25 19:02:31 PDT 2013


Oleg, David,

There is latency in the sensor, so when camera sends i2c command to sensor it takes 3 frames before you'll get the frame with new exposure. If you do not specify which frame do you want to apply changes to, default is 3 frames ahead, and driver "knows" when to send parameters change to the sensor so 3 frames after now you'll get the new exposure. Different parameters have different latencies, and free running/triggered mode also has them different. There is some debug feature embedded in parsedit.php - you may change several parameters with different delays and open a table of 9 images - each will have caption with effective paramer values and frame numbers (some frame that are output "bad" by the sensor may be dropped - it happens when you change frame format).

Andrey

---- On Mon, 25 Mar 2013 18:44:56 -0700 Oleg <support-list at support.elphel.com> wrote ---- 


Hi David,
 When I load the script on the camera [5], I see that the parameters are
 changed, as PHP tells me, but the image I load after changing the
 exposure time is the same as before (or at least the brightness doesn't
 change), or isn't loaded at all.


The problem is that PHP prints the output page once the script is done... and the browser starts downloading these images after the page is printed - so it always gets the latest images.
  
What you can do is:
1. use "flush();" in PHP - I remember it worked a while ago it but couldn't make it work for the past hour.
2. if you get "flush()" working  you might bump into browser buffering images - so, for "src"-tag it's better to make up different addresses, e.g.:
 <img src='http://".$_SERVER['HTTP_HOST'].":8081/img?".microtime()."' width='200' /> 

3. Use AJAX calls with JS to load images and run scripts.



Best regards,
Oleg Dzhimiev
Electronics Engineer
phone: +1 801 783 5555 x124
Elphel, Inc. 
 _______________________________________________ 
Support-list mailing list 
Support-list at support.elphel.com 
http://support.elphel.com/mailman/listinfo/support-list_support.elphel.com 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://support.elphel.com/pipermail/support-list_support.elphel.com/attachments/20130325/08605cd3/attachment-0002.html>


More information about the Support-list mailing list