[Elphel-support] Setting exposure time via PHP

David Haberthür david.haberthuer at psi.ch
Thu Apr 18 07:49:29 PDT 2013


Ciao Andrey et al.

On 04/17/2013 06:46 PM, support-list wrote:
> David, elphel_wait_frame(N) waits for an absolute frame number N, so frame number 3 already passed (during camera startup), and that function returns immediately, so
>  elphel_skip_frame(N) is equivalent to  elphel_wait_frame(elphel_get_frame()+N)
Ok, I didn't really get that. Thanks for making it clear. I supposed
that elphel_wait_frame(N) waits for N frames at the current pointer.

>  > I tried to do it like this 
>  > --- 
>  > echo "<img src="http://192.168.0.9:8081/img" width='200'>; # curr. img 
>  > elphel_set_P_value(ELPHEL_AUTOEXP_ON,0); # turn off autoexposure 
>  > elphel_set_P_value(EXPOS,100000); # set exposure to 0.1 sec 
>  > elphel_wait_frame(5); # to be on the safe side 
>  > echo "<img src="http://192.168.0.9:8081/last/img" width='200'>; 
>  > --- 
> Same - frame #5
> 
>  >  
>  > Should this not show me first an image from the free running mode, with 
>  > autoexposure on, then turn off autoexposure and set another exposure, 
>  > wait for some time and show me the new image? 
> 
> I'm not sure - need to check - what is the latency of the of the autoexposure on/off - the best way to check is to use parsedit.php with 9 images, because normally autoeposure is not turn on/off ay high frequency. I would first turn autoexosure off (once) and wait some frames. After that exposure will change with predicted latency (with some sensor restriction - it does not allow to change exposure each frame - should skip one at least between changes)
I also don't plan to switch the autoexposure state quickly, I just
wanted to make sure that I don't show the user a "wrong" image. I'll do
as you suggested.

>  > Long story short, how can I make sure I show the user the image where 
>  > the new exposure time has been set?
> 
> Basically do as you did with elphel_skip_frames(3) - or proper use elphel_wait_frame(N). You can always check the latencies with pasedit.php and 9 images - you can put multiple exposure (or other parameters)  changes with different delays in the same test (some examples are shown if you open parsedit.php without any parameters), then look at the 9-image table and analyze the chnages - each frame will be numbered and annotated with parameters that chnaged.
I'll do it with elphel_skip_frames(3) and - if necessary - go the route
of checking the latency through parsedit.php.

David




More information about the Support-list mailing list